码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2019-10-29 00:31:53      阅读:113      评论:0      收藏:0      [点我收藏+]

标签:关键字   设计   manual   style   查询   code   ror   col   今天   

转自: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

标签:关键字   设计   manual   style   查询   code   ror   col   今天   

原文地址:https://www.cnblogs.com/manmanchanglu/p/11756222.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!