MySQL报错:check the manual that corresponds to your MySQL server version for the right syntax to use

项目报错:
项目运行时,MySQL报错:check the manual that corresponds to your MySQL server version for the right syntax to use

错误原因:
字段名与SQL关键字冲突

解决:
查看数据库映射xml文件,将与SQL关键字冲突的字段用``括起来
(注意:不是单引号,是左上角带波浪线的那个键)
比如
在这里插入图片描述

字段key是SQL关键字,需要括起来才不会报错

猜你喜欢

转载自blog.csdn.net/m0_68681879/article/details/129852051