场景

在进行MyBatis查询数据时提示:

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 ' select * from users where userName= 'badao'' at line 1

可以确定是sql语句有问题。

定位到此sql语句的位置是userMapper.xml

但是复制出来sql语句以及控制台报错的语句能在数据库中查询出数据。

实现

确定执行的sql没有语法错误外,考虑去掉所有无关的空格和换行等。

然后将全部内容剪切出来,然后保存,然后再将内容粘贴回去,然后保存。

竟然不报错了。

MyBatis中提示:You have an error in your SQL syntax; check the manual that corresponds to your MySQL ser相关推荐

  1. Hibernate: You have an error in your SQL syntax; check the manual that corresponds to your MySQL

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

  2. Error:1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL

    错误代码: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL ser ...

  3. [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL

    1.MySQL建表报错: [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to ...

  4. [Err] 1064 - You have an error in your SQL syntax check the manual that corresponds to 之Mysql报错

    当利用navicat用sql语句建表时候,出现如下报错 从下图我们可以看到,是我们最后一行的末尾多加了一个逗号. 当我们将最后一行的逗号取消掉就正常运行了 特别注意:最后一行的末尾没有逗号. http ...

  5. MySQL建表1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL

    MySQL在导表新建的时候会有索引报错,如下: PRIMARY KEY (`tag_id`) USING BTREE,为导出的SQL语句,但是实际运行时需要改为如下: PRIMARY KEY `tag ...

  6. 数据库工作笔记005---You have an error in your SQL syntax; check the manual that corresponds to y

    JAVA技术交流QQ群:170933152 Query : select * from order LIMIT 0, 1000 Error Code : 1064 You have an error ...

  7. Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My

    转自:https://blog.csdn.net/haha_66666/article/details/78444457 Query : select * from order LIMIT 0, 10 ...

  8. sql语句异常 You have an error in your SQL syntax; check the manual that corresponds to your.......

    我们在写sql时可能会遇见: You have an error in your SQL syntax; check the manual that corresponds to your-类似这种开 ...

  9. 已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo

    已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo ...

最新文章

  1. Django设计模型1.2
  2. php使用es搜索引擎,分布式搜索引擎Elasticsearch PHP类封装 使用原生api
  3. 这款库克寄予厚望的苹果产品,只活了2年
  4. Lua和C语言的交互——C API
  5. php的文件路径问题
  6. boost::iostreams::back_inserter用法的测试程序
  7. Django在admin.py中设置date_hierarchy时报错
  8. P3338 [ZJOI2014]力 FFT + 推式子
  9. C++TCP和UDP属于传输层协议
  10. python基础教程百度云-python从入门到精通视频教程百度云资源
  11. 大吉大利,今晚如何用R语言解锁“吃鸡”正确姿势
  12. 工大瑞普 NP-OSPF综合实验
  13. 北斗三号频点_解码北斗三号:和前两代卫星相比,它有何不同?
  14. 李子奈《计量经济学》第四版笔记和课后答案
  15. 网络安全实验室--基础关
  16. ICEM 网格划分技巧(21-5)
  17. 什么是中药药浴?中药药浴的操作方法和注意事项
  18. 正则化和正则化的思想
  19. 智能家居之远程视频监控
  20. stm32f4晶振管理

热门文章

  1. crontab shell 每5秒执行_centos 定时任务按秒执行crontab
  2. c++ 多线程 类成员函数_多线程(C++/Python)
  3. access超过255列数据_Access的数据类型,与Excel虽类似,数据库+sql更适合大量数据管理...
  4. 用php怎么输出饼状图,php绘图之生成饼状图的方法_PHP
  5. sqlite常见使用总结
  6. html圆角边框只有左边,border-radius以外的CSS圆角边框制作方法
  7. python2与python3在absolute import的区别
  8. 在线学习与离线学习如何区分
  9. php怎麼讲$字段的值截取第一个字,PHP截取中文字符串方法总结
  10. 计算机强化课程计算机网络,大学计算机网络技术课程教学改革