[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 xxxx

踩坑了


数据表对应如下

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

hiberbate 执行save:

报错:[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, title, id) values ('这是公告内容', null, 0, '这是标题', 0)' at line 2

只提示在某一行附近出错,sql就一行,我怎么知道是在哪一个字段

解决方法:复制控制台打印得到的sql语句,放到navicat运行

出现错误是一样一样的

[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

为什么不把sql语句多个字段分行后运行查询呢,这样报错应该就会定位到某一个字段了,哈哈

看颜色应该是sql的某个关键字,字段与关键字名雷同了,就需要改字段名,然后就可以了

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

百度查询结果奉上:

http://dcx.sybase.com/1201/zh/dbreference/read-statement.html


相关文章:

  • 2021-07-19
  • 2021-04-09
  • 2021-08-15
  • 2021-11-10
  • 2021-05-31
  • 2021-11-17
  • 2021-06-27
  • 2021-12-08
猜你喜欢
  • 2021-12-20
  • 2021-11-22
  • 2021-10-20
  • 2021-06-21
  • 2021-04-27
  • 2021-06-27
相关资源
相似解决方案