SQL保留关键字误作为字段使用报错SQL Error: 1064, SQLState: 42000
2016-11-21 12:18
579 查看
在hibernate中,插入数据时一直报错:
刚开始一直以为是乱码的问题,但是不是,研究了之后,才发现是使用了SQL的关键字作为了字段,后来改了相对应的字段后,正常插入,其中使用的关键字为usage。
最主要的错误信息提示
然后百度sql关键字查到链接,以备不时之需:http://www.360doc.com/content/12/0203/11/3688062_183844013.shtml
后期可能会整理一份待定
2016-11-21 12:09:28,693 -- WARN -- org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions(SqlExceptionHelper.java:144) -- SQL Error: 1064, SQLState: 42000 2016-11-21 12:09:28,693 -- ERROR -- org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions(SqlExceptionHelper.java:146) -- 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 'usage) values (12, '12', '12', 10, 12.0, '???è??', '12')' at line 1 2016-11-21 12:09:28,708 -- ERROR -- com.opensymphony.xwork2.util.logging.commons.CommonsLogger.error(CommonsLogger.java:38) -- Exception occurred during processing request: could not execute statement org.hibernate.exception.SQLGrammarException: could not execute statement
刚开始一直以为是乱码的问题,但是不是,研究了之后,才发现是使用了SQL的关键字作为了字段,后来改了相对应的字段后,正常插入,其中使用的关键字为usage。
最主要的错误信息提示
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions(SqlExceptionHelper.java:144) -- SQL Error: 1064, SQLState: 42000
然后百度sql关键字查到链接,以备不时之需:http://www.360doc.com/content/12/0203/11/3688062_183844013.shtml
后期可能会整理一份待定
相关文章推荐
- [转]MySQL保留关键字(SQL Error: 1064, SQLState: 42000错误)
- mysql 报错ERROR 1064 (42000),原因使用了mysql保留字
- [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]SQL Error: 1064, SQLState: 42000问题的解决办法
- 后台报SQL Error: 1064, SQLState: 42000错误
- SQL Error: 1064, SQLState: 42000错误
- 后台报SQL Error: 1064, SQLState: 42000错误
- sql常用的关键字 (避免在table中使用这些作为字段)
- SQL Error: 1064, SQLState: 42000错误
- SQL Error: 1064, SQLState: 42000 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
- SQL Error: 1064, SQLState: 42000 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve
- SQL Error: 1064, SQLState: 42000
- SQL Error: 1064, SQLState: 42000数据库异常
- SQL ERROR: 1064, SQLSTATE: 42000错误原因
- WARN: SQL Error: 1064, SQLState: 42000
- 14629 [http-8080-1] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1064, SQLState: 42000
- SQL Error: 1064, SQLState: 42000错误原因
- mysql SQL Error: 1064, SQLState: 42000
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- 后台报SQL Error: 1064, SQLState: 42000错误