error 1064 (42000)

  • updated
  • Answered


Server version: 8.0.31 MySQL Community Server - GPL

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use banking

Database changed

mysql> create table account (name varchar(10),accn varchar(10),dob varchar(10),add varchar(10),cn varchar(10),ob int);

ERROR 1064 (42000): 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 'add varchar(10),cn varchar(10),ob int)' at line 1


IMH Support Agent 2
  • Answered


Sorry for the issues with your SQL code.  We generally will only be able to provide limited help with coding.  We recommend you work with an experienced developer if you require further assistance.  In regards to the error statement, it is a syntax error, so your code has a problem with the way that it was written.  This could be punctuation, incorrect use of a command, incorrect values, or the use of a reserved word.  In this case, it's easy to see that you're using "ADD."  That is most likely a reserved word you're trying to use in your table.  Change the name of that column, and it should be okay.

If you have any further questions or comments, please let us know.

Kindest Regards,

Arnel C.