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

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

MyBatis中踩到的坑!中文空格!!!

事情大概是这样的,我需要一个查询语句,然后调用Mapper的时候提示Sql语法错误

最后通过一张图发现了问题的根本原因!!!版本提交前后对比!!!You have an error in your SQL syntax; check the manual that corresponds to your MySQL server_第1张图片

  1. 我发现唯一的区别就是上面红色框中有改动!所以我认为中文空格会导致sql语法错误
  2. 然后我去MySQL数据库测试了一下果然会报错!!!
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server_第2张图片

你可能感兴趣的:(You have an error in your SQL syntax; check the manual that corresponds to your MySQL server)