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

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

这样就不会错误

posted @ 2020-07-04 12:02  study_php_java_C++  阅读(193)  评论(0编辑  收藏  举报