问题描述
前端添加请求发往后端处理时,发现报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关键字记录如下。