問題描述:
在更新數(shù)據(jù)時(shí)候遇到如下報(bào)錯(cuò)信息:
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 ‘order’’ at line 4
解決方案:
1、先檢查自己的字段是否正確匹配,可能是字符出現(xiàn)了錯(cuò)誤文章來源:http://www.zghlxwxcb.cn/news/detail-509274.html
2、還有可能是不小心用到了sql的關(guān)鍵詞,比如這兒出現(xiàn)的錯(cuò)誤就是因?yàn)橛昧薿rder作為數(shù)據(jù)表的字段名導(dǎo)致報(bào)錯(cuò);將字段名修改一下即可更新成功,比如將order改為order_nama之類的。文章來源地址http://www.zghlxwxcb.cn/news/detail-509274.html
到了這里,關(guān)于【解決問題】Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your S的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!