org.springframework.jdbc.BadSqlGrammarException: Error updating database
  ejdQbmcNduLw 2023年12月22日 90 0


org.springframework.jdbc.BadSqlGrammarException: Error updating database_mysql

💗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

org.springframework.jdbc.BadSqlGrammarException: Error updating database_SQL_02


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


org.springframework.jdbc.BadSqlGrammarException: Error updating database_SQL_03


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年12月22日 0

暂无评论

ejdQbmcNduLw