在做项目的时候遇到这个问题,提示的异常是
com.mysql.jdbc.exceptions.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 '8 * from t_admin' at line 1
问题描述 用hibernate分页时,一个简单的查询语句完全正确,可是还是报异常
问题解决
1 查找sql或hql语句的语法错误
2 查看表是否使用关键字
3 查看调用函数的使用方法
4 实在无法找出来的时候查看hibernate配置时的方言hibernate.dialect是否写错成别的方言