首页 > 代码库 > mysql数据库字段命名与关键字冲突之坑
mysql数据库字段命名与关键字冲突之坑
mysql> SELECT desc,status,play_time,push_type, ‘interval‘ FROM cms_push;ERROR 2006 (HY000): MySQL server has gone awayNo connection. Trying to reconnect...Connection id: 700Current database: xxx_cmsERROR 1064 (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 ‘desc,status,play_time,push_type, ‘interval‘ FROM cms_push‘ at line 1
问题很简单,desc和interval是关键字,需要加上引号,以后起名要注意了
mysql> SELECT ‘desc‘,status,play_time,push_type,‘interval‘ FROM cms_push;
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。