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 near 'in (
'1'
)' at line 1


错误分析:

MySQL语法错误,并且是在第一行的“ in ('1')' ” 的附近检查。


查找错误:

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

上面的SQL语句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 ...是错误的,这里不应该有“=”。


解决办法:

删除这个“=”号即可。

上一篇:品牌logo在EDM数据营销中的运用


下一篇:check the manual that corresponds to your MySQL server version for the right syntax处理方案