MySQL错误:ERROR 1064 (42000): use near 'order’解决


环境

MySQL Sever 5.1 + MySQL命令行工具

问题

ERROR 1064 (42000): You have an error inyour SQL syntax; check the manual that orresponds to your MySQL server versionfor the right syntax to use near 'order’

解决

表名使用了关键字,数据库中命名要避免使用关键字。Hibernate中查询语句为字段起别名,目的就是避免使用关键字。

相关内容