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重名了!!表名不能与关键字相同!

Logo

更多推荐