首页 > 数据库技术 > 详细

mysql5.7当两个字段名类似,查询时会出错

时间:2020-07-04 12:05:27      阅读:54      评论:0      收藏:0      [点我收藏+]
excepInfo: select id,describe from iwebshop_student_problem  where id=256   order by id desc 
 -- 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 iwebshop_stu

这个表中存在两个字段 describe,describe2,

所以需要加上符号` 

select `id`,`describe` from iwebshop_student_problem  where id=256   order by id desc

这样就不会错误

mysql5.7当两个字段名类似,查询时会出错

原文:https://www.cnblogs.com/init-007/p/13234443.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!