Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syn

当出现以下错误时:

Error updating database.  Cause: 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 'add='在进行测试哦' where id=2' at line 1

不一定是符号出现了错误,还有可能是不小心用到了sql的关键词,比如我出现的错误就是因为用了add作为数据表的列名。

SQL语句关键词详参考下面的链接:https://blog.csdn.net/qq_32038679/article/details/80551580

猜你喜欢

转载自blog.csdn.net/qq_39847344/article/details/85249247
今日推荐