在跑查询列表的时候,控制台突然报了一个这个错误
### Error querying database. Cause: 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 ‘leave’ at line 1
说是SQL语句异常,结合日志和debug检查了几次都没有发现错误,把查询语句放到navcat里面跑了一下,给报了1064这个错误,结合百度得知1064是使用了mysql关键字。
说实话,我是万万没想到leave是mysql关键字。。。。
SELECT * FROM leave
> 1064 - 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 'leave' at line 1
> 时间: 0.014s
另附mysql关键字一份