一篇文章让你解决sql报错

反馈
因为这一个问题,找到了很多类似问题,你在看到这篇博客时,可能不是这个,但是一定是下面其中一个:

Mysql错误:check the manual that corresponds to your MySQL server version for the right syntax【加 `符号、修改有冲突的字段名】

check the manual that corresponds to your MySQL server version for the right syntax错误【字段名用了关键字】 check the manual that corresponds to your MySQL server version for the right syntax to use near【where前多加了逗号】

Mysql异常check the manual that corresponds to your MySQL server version for the right syntax总结【sql是否有中文字符 、是否与关键字冲突、是否含特殊字符、是否正确分行】

疑问
在写spring ssm框架的demo时遇到mybatis映射mapper里报sql错误,报错如下:

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

字面意思是说我sql语句中的某一处的右边有特殊符号

报错截图
解决
后来找到了原因,就是mybatis里的映射配置文件中写sql语句,后面不用加结束符号,而我加了,挺想踹自己一脚的,可是又舍不得

错误原因

总结
在代码中每次都会遇到前所未有的异常报错,话说回来,程序员不就是这样在错误中成长的吗,不断地发生错误,解决错误,记住错误。

Logo

更多推荐