Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CREATE TABLE Delat(
Staff_id INT PRIMARY KEY,
First_Name VARCHAR(20),
Last_Name VARCHAR(20),
Department VARCHAR(30),
Designation VARCHAR(50),
);



ERROR MESSAGE
Copy Code
Error: 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 ')' at line 7
Error Code: ER_PARSE_ERROR

What I have tried:

Trying to create my first table. Have searched online for solution, but to no avail.
Posted
Updated 26-Aug-22 17:35pm

1 solution

Quote:
Error: 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 ')' at line 7

You may have to remove the ",".
SQL
CREATE TABLE Delat(
Staff_id INT PRIMARY KEY,
First_Name VARCHAR(20),
Last_Name VARCHAR(20),
Department VARCHAR(30),
Designation VARCHAR(50), <= Remove the ',' here
);
 
Share this answer
 
Comments
Jyde24 27-Aug-22 3:33am    
Patrice T
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900