Hibernate出错 SQL Error: 1064, SQLState: 42000
Hibernate: select commodityc0_.commodityClassID as commodit1_0_, commodityc0_.commodityClassName as commodit2_0_ from fcShopping.dbo.commodityClass commodityc0_
21:20:04,976 WARN
JDBCExceptionReporter:77 - SQL Error: 1064, SQLState: 42000
21:20:04,980 ERROR JDBCExceptionReporter:78 - 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 '.commodityClass commodityc0_' at line 1
网上说可能是sql语句用了mysql的保留字或者是二进制数据的编码问题,但我都试了,还是不行。我是在调试已经有的代码,所以sql语句应该不会错。哪里可能会有问题,谢谢大家了。
------解决方案--------------------
你把语句贴出来大家看下就知道啦。