加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Mysql报错:the right syntax to use near ''

(2017-07-27 20:24:02)
标签:

bad

sql

grammar

分类: 错误处理
1、完整报错信息
org.springframework.jdbc.BadSqlGrammarException: 
2017-07-27T12:14:08.976539876Z ### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 '' at line 1
2017-07-27T12:14:08.976551021Z ### The error may involve com.wyun.platform.rs.dao.custom.UserRecHistoryMapper.addUserRecHistory-Inline
2017-07-27T12:14:08.976558497Z ### The error occurred while setting parameters
2017-07-27T12:14:08.976565121Z ### SQL: insert into user_rec_history(user_id, news_id, algo_id, platform) VALUES
2017-07-27T12:14:08.97657157Z ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 '' at line 1
2017-07-27T12:14:08.976578203Z ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 '' at line 1

2、原因分析:
经常反馈,我线下测试都没有问题的啊,怎么线上跑就有问题了。
兄弟,你组装sql时的值判空了吗

0

阅读 收藏 喜欢 打印举报/Report
后一篇:迭代器模式
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有