SpringMVC:com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax;

今天用SpringMVC做修改添加操作,之前的操作都实现了添加修改,但始终报com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax...

在网上查找了很多资料,说是数据库编码问题、springMVC是否设置CharacterEncodingFilter过滤器,这些方案都解决不了我的问题

实在不行,我把Hibernate发出的sql语句粘贴到Navicat中进行sql操作,同样的也报出了同样的错

偶然发现,我这张表的limit字段颜色是蓝色,恍然大悟,原来是与数据库关键字重复,修改limit字段,结果操作正常

所以大家以后建库要注意避免与数据库关键字重复,造成不必要的问题!

MYSQL关键字列表:http://www.cnblogs.com/jiangshan5xian/archive/2013/03/16/2963496.html

时间: 2024-10-15 20:52:43

SpringMVC:com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax;的相关文章

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException错误

com.mysql.jdbc.exceptions.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 'receiverTel='123131' payment=0,time ='2015-04-10 10:14', trade

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

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 ':ge

数据库表里命名有这个字段,可怎么就是报错呢,大神的解释: 加上之后立马好用!!! 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 ':ge

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax;问题的解决

哇,时隔两天时间,终于找到这个问题的解决办法,先看问题 这是我最近写的家庭记账本网页版,按顺序输入点击保存,总是弹出添加失败的提示 顺着找原因,把原因锁定在dao层的sql语句上,反复检查,没有找到一点毛病,程序其他地方也没有错误,这让我郁闷了好久,今晚查了一下控制台里的这条错误提示,我找到了答案,原因就在我的数据库表的属性与mysql数据库关键字重合,然后我就在可以的地方加点前缀之类的东西,问题就迎刃而解了! 如图:  (^-^)V 原文地址:https://www.cnblogs.com/j

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL

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(

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:插入blob数据时出现乱码

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 near 'u–ì€?ú?]qs\0¥?c§?wb????ú??h?A?nC??W·g·ù+\',YóXè2o?

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 '?,?,?,?)'

使用?占位符写MYSQL查询语句,执行报错 1 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 near '?,?,?,?)' at line 1 2 at sun.ref

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large (> 8126)

同样是工作中遇到的问题,写下来留个纪念. 一个老系统已经跑了一年多了,最近报出这个问题的,具体问题贴出来给大家看 org.springframework.jdbc.BadSqlGrammarException: ### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large (> 8126). Changing some colum