[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 server 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 1

解决方案:

发现解决该问题的关键,是错误提示中的空格都是“聽”,这让我想到是文件的编码问题,然后做文件编码的转换。

推荐使用Notepad++,编码转换非常方便,如图:

转换为UTF-8格式,问题依旧,再转为ANSI格式试试:

哈哈,原形毕露了吧!把?都替换为空格,保存,再执行,一切OK了。

反思:

为什么会出现这种问题呢?

这些语句是从QQ复制到Word中,双从Word中复制到Notepad++中,

估计是从QQ或Word中复制出来的空格有问题。

时间: 2024-08-08 14:25:19

[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

关于用Power Designer 生成sql文件出现 错误  [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 'int not null auto_increment comment '用户id', 的解决办法 sql语句如下 1 drop table

插入数据库失败([Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version)

报错信息如下: [SQL]INSERT INTO read VALUES(123, 456) [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 'read VALUES(123, 456)' at line 1 原因,read是数据库的关键字, 牢记,如果

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 server version for the right syntax to use near 如果不是符号中英文切换的问题,那就是反引号写成单引号引起的  参考链接:https://blog.csdn.net/qq_27495157/article/details/80240156 原文地址:htt

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

INSERT INTO `ftms_active_dealer`(dealer_code,dealer_name,active_id,dealer_state)VALUES('415A1','贺磊'10023','1'),('31042','魏小彬'10023','1'); [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versio

插入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语句时候,mysql一直报错: [SQL] INSERT INTO ORDER ( id, activity_id, order_type, phone, order_amount, order_state, pay_type)VALUES ( '4', '2121313', '1', '13552444989', '1', '1', '1' ) [Err] 1064 - You have an error in your SQL syntax; check the man

Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My

转自:https://blog.csdn.net/haha_66666/article/details/78444457 Query : select * from order LIMIT 0, 1000 Error Code : 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

MySQLSyntaxErrorException: 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 ...

下面是我update数据库时打印出来的异常: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use nea

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version

1.错误描述 org.hibernate.exception.SQLGrammarException: error executing work at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:80) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(

解决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 &#39;order (order_name, customer)

在学习hibernate一对多映射关系时,根据视频学习的时候,例子是顾客和订单的问题,一个顾客有多个订单.按照视频中的敲代码出现了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 'order (order_name, customer) 原因是order是mysql关键字,不能做