Following is my query, can any one help me to over come this .
I am getting " #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONSTRAINT pri_ky primary key,job_id int CONSTRAINT not_l NOT NULL)' at line 1 " as error
create table employee(employee_id int CONSTRAINT pri_ky primary key,job_id int CONSTRAINT not_l NOT NULL)
Iftikar HussainPosted Aug 10, 2013, 9:38 AM
You should not use CONSTRAINT while creating a new table.
Please refer the below link for more details
http://www.w3schools.com/sql/sql_primarykey.asp
Regards,
Iftikar
Sunny SharmaPosted Aug 10, 2013, 5:20 AM
CONSTRAINT keyword is not required while creating a table, use the syntax below:
Happy Coding :)
Cheers!