【Bug】解决 java.sql.SQLSyntaxErrorException 异常

 

    java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax 错误

错误详情:

Caused by: 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 'interval, is_loop, remarks, standard_id' at line 1

  本以为是我插入传参用swagger示例传入的有问题,正儿八经写参数还是如此。

 

出现此错误为:数据库字段存在关键字,表中的字段不可与SQL中的关键字相同(本次我遇到的问题interval是SQL中的关键字

      或 数据库字段不匹配,语法错误 等引起的错误

只需检查数据库和sql语句即可解决!

posted @ 2018-11-16 11:33  劉Sir  阅读(48582)  评论(2编辑  收藏  举报