[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL

1、MySQL建表报错:

   [Err] 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

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL_第1张图片

2、解决办法:

    应该是字符编码造成的,使用Notepad++,编码转换非常方便,如图

 [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL_第2张图片

 会发现好多空格,如下图:

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL_第3张图片

 继续选择以ANSI编码,如下图所示:

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL_第4张图片

发现好多?号,将?替换为空格,执行即可!

 [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL_第5张图片

你可能感兴趣的:(mysql,mysql)