当前位置:首页 » 《随便一记》 » 正文

org.springframework.jdbc.BadSqlGrammarException: Error updating database

21 人参与  2023年01月21日 10:49  分类 : 《随便一记》  评论

点击全文阅读


在这里插入图片描述

?wei_shuo的个人主页

?wei_shuo的学习社区

?Hello World !


org.springframework.jdbc.BadSqlGrammarException: Error updating database

报错信息:

org.springframework.jdbc.BadSqlGrammarException:

Error updating 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 ‘deletes from mybatis.user where id=5’ at line 1

分析:

您的 SQL 语法有误

You have an error in your SQL syntax

检查与您的MySQL服务器版本相对应的手册,了解在附近使用的正确语法 ‘deletes from mybatis.user where id=5’

check the manual that corresponds to your MySQL server version for the right syntax to use near ‘deletes from mybatis.user where id=5’ at line 1

根据标错信息得知SQL语句写错了,此时需要检查书写SQL的文件(userMapper.xml映射文件),发现手误写错delete

在这里插入图片描述


? 结语:创作不易,如果觉得博主的文章赏心悦目,还请——点赞?收藏⭐️评论?冲冲冲?


在这里插入图片描述


点击全文阅读


本文链接:http://zhangshiyu.com/post/51688.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1