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
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
出现这个异常大概有两个原因:
1.仔细查看自己的sql语句写错了没,可以把sql语句放到电脑安装数据库软件中去试试,没问题的话就是2.的问题;
2.就是mysql和jdbc的jar包版本不一致,比如说mysql是8的版本,而jar是5几的版本;
愿你们能完美解决!