前台页面出现如下异常
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 'condition = 80.0,
后台出现如下异常:
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 'condition = 80.0,
原因:说明 condition 在数据库中是关键字,不可以直接使用
解决方案:将condition 加上 'condition' ,比如: 'condition' = #{condition }即可
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versio
最新推荐文章于 2022-09-23 15:38:32 发布
本文介绍了一种常见的SQL语法错误——关键字未被正确引用导致的问题,并提供了具体的解决方案。
3万+

被折叠的 条评论
为什么被折叠?



