Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; 问题的解决
问题描述
Caused by: java.sql.SQLSyntaxErrorException: 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 status !='已完成'' at line 1
问题解决
最后发现时因为我的数据库表名时一个关键字,不能将其识别为数据库的表名,从而报错(人在江湖飘,报错一直在);
将order的表名改成一个不是关键字的名称就解决啦~~
当然,还有一种可能是sql语句出错了~~