MySQL——ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds……

时间:2025-04-22 16:00:03

问题:

很久没用Mysql了,写了以下建表语句,发现报出如下错误:

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 ')' at line 1

解决:

 写建表语句时,对于表名和变量名,既不能使用单引号,也不能使用双引号

要么什么也不用,要么就是用反引号,也就是键盘上的波浪线键

同时,在mysql查询语句中,其实单引号和双引号没啥区别,单引号和双引号都可以表示字符串