您的位置:首页 > 数据库

Translating SQLException with SQL state '42000', error code '1064', message [You have an error in yo

2017-06-17 15:52 696 查看
概述:

尴尬自动生成代码都有错误,很郁闷,最后发现用了mysql的保留字 desc

[org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - Translating SQLException with SQL state '42000', error code '1064', message [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 'desc )
values ( '00aaaaaaaaaaaaaa',

'26208',

' at line 11]; SQL was [] for task [
### 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 'desc )
values ( '00aaaaaaaaaaaaaa',

'26208',

' at line 11
### The error may involve com.rinlink.intelligent.DAO.LockStatusDAO.insertSelective-Inline
### The error occurred while setting parameters
### SQL: insert into lock_status ( device_id, serial_num, status, desc ) values ( ?, ?, ?, ? )
### 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 'desc )
values ( '00aaaaaaaaaaaaaa',

'26208',

' at line 11
]
[com.rinlink.intelligent.socket.parser.ParserDispatch] - 解析过程失败
mysql保留字参考如下:
http://luanxiyuan.iteye.com/blog/2224331 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐