You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version

「爱情、让人受尽委屈。」 2021-09-21 19:32 334阅读 0赞

博客来源:

编写项目的时候,明明是自动生成的代码程序,调用的时候出现SQL问题,问题如下

org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: 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 ‘limit, LeaveNum

通过寻找问题来源发现,定义数据库的时候,名称起的过于随意 导致的问题

20210305220935127.png

起名字 的时候,导致占用了关键字,对于关键字的话谁也无能为力啊,只能更改数据库中的属性,重新进行生成代码

发表评论

表情:
评论列表 (有 0 条评论,334人围观)

还没有评论,来说两句吧...

相关阅读