1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

时间:2024-03-17 11:00:38

报错现象

MYSQL眼看着语法明明没错误,却报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 '这个错误。
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

原因

因为.xml里面的某些内容我是从网上复制粘贴到我的mybatis的xml文件里面去的。比如我下面圈出来的这部分,就是网上复制的。里面会有意思不到的字符串1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

解决方案

自己对照手工敲一遍就好了。搞了两天,最后在一个群里有经验的前辈告诉我的,日哦!