[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
2016-11-15 18:54
666 查看
[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 at line 3
MySQL 5.6,Navicat For MySQL 10.0.10 中执行SQL语句时提示此错误,在CMD中执行SQL文件中的语句时提示以下错误:
2
3
4
5
6
7
1
2
3
4
5
6
7
[/code]
发现解决该问题的关键,是错误提示中的空格都是“聽”,这让我想到是文件的编码问题,然后做文件编码的转换。
推荐使用Notepad++,编码转换非常方便,如图:
转换为UTF-8格式,问题依旧,再转为ANSI格式试试:
哈哈,原形毕露了吧!把?都替换为空格,保存,再执行,一切OK了。
为什么会出现这种问题呢?
这些语句是从QQ复制到Word中,双从Word中复制到Notepad++中,
估计是从QQ或Word中复制出来的空格有问题。
version for the right syntax to use near at line 3
MySQL 5.6,Navicat For MySQL 10.0.10 中执行SQL语句时提示此错误,在CMD中执行SQL文件中的语句时提示以下错误:
D:\Users\Aven>mysql -uroot -p < F:\Publish\Data\share_update.sql Warning: Using a password on the command line interface can be insecure. ERROR 1064 (42000) at line 4: You have an error in your SQL syntax; check the ma nual that corresponds to your MySQL server version for the right syntax to use n ear 'ALTER聽TABLE聽mcu聽CHANGE聽`LOCAL_ID`聽`LOCAL_ID`聽VARCHAR(50)聽' at line 11
2
3
4
5
6
7
1
2
3
4
5
6
7
[/code]
解决方案:
发现解决该问题的关键,是错误提示中的空格都是“聽”,这让我想到是文件的编码问题,然后做文件编码的转换。推荐使用Notepad++,编码转换非常方便,如图:
转换为UTF-8格式,问题依旧,再转为ANSI格式试试:
哈哈,原形毕露了吧!把?都替换为空格,保存,再执行,一切OK了。
反思:
为什么会出现这种问题呢?这些语句是从QQ复制到Word中,双从Word中复制到Notepad++中,
估计是从QQ或Word中复制出来的空格有问题。
相关文章推荐
- [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
- 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 s
- [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
- Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL se
- [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
- 报错:[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQ
- 创建存储过程错误(已解决):Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ver
- 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
- 插入mysql语句报错: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
- SQL Error: 1064, SQLState: 42000 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve
- SQL Error: 1064, SQLState: 42000 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- 错误信息:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version