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关键字冲突的字段用``括起来
(注意:不是单引号,是左上角带波浪线的那个键)
比如
MySQL报错:check the manual that corresponds to your MySQL server version for the right syntax to use_第1张图片

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

你可能感兴趣的:(后端,后端报错,mysql,数据库,sql)