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

Posted 慢漫长路

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 near ‘order LIMIT 0, 1000’ at line 1

今天在查询数据的时候遇到这个错误,特别的郁闷,感觉自己写的sql语句没有问题啊,但就是提示我的sql语法错误,后来终于找到了原因

该错误一般出现在表名或字段名设计的过程中出现了mysql关键字导致的。

如果你用了mysql中的关键字做字段,当你查询的时候可以用 `把 order 来括起来

这个 `并不是单引号,而是数字那一行键的最左边的那个键,注意要在在英文状态下输入,用它把关键字括起来就可以解决这个问题

以上是关于Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My的主要内容,如果未能解决你的问题,请参考以下文章

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

mysql 数据库导入数据错误 #1064 - You have an error in your SQL syntax; check the manual

Python操作mysql数据库出现pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; c

ERROR 1064 (42000): You have an error in your SQL syntax...

1064 - You have an error in your SQL syntax;

Mysql错误 ERROR 1064 (42000): You have an error in your SQL syntax