mysql数据库字段命名与关键字冲突之坑
mysql> SELECT desc,status,play_time,push_type, ‘interval‘ FROM cms_push; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 700 Current database: xxx_cms ERROR 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;
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。