0
点赞
收藏
分享

微信扫一扫

org.springframework.jdbc.BadSqlGrammarException: Error updating database


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_mybatis_03


举报

相关推荐

0 条评论