Exception in thread “main”
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 ‘order where user_id=1’ at line 1
它说是sql语句错误,找了很久也没发现,后来再仔细看这个错误,才发现我的表名order与数据库关键字order by重名了!!表名不能与关键字相同!
解决You have an error in your SQL syntax; check the manual that corresponds to your MySQL server错误
最新推荐文章于 2025-09-28 10:42:02 发布
本文介绍了一个关于SQL语法错误的问题,作者发现表名与数据库关键字相同导致了异常。通过更改表名,成功解决了这一问题。
3万+





