99网
您的当前位置:首页MySQL报错检查你的版本for the right syntax to use near ‘describe’

MySQL报错检查你的版本for the right syntax to use near ‘describe’

来源:99网

问题描述

前端添加请求发往后端处理时,发现报SQl错误。
ERROR 10 (42000): 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 'describe from t_food' at line 1

原因

原来是t_food表中的字段名describe是MySQL的关键字,所以编写SQL语句时,爆出了语法错误。

解决方法

select name `describe` from t_food 

MySQL5.7关键字记录如下。

因篇幅问题不能全部显示,请点此查看更多更全内容