在mysql 5.6上online这个词是保留字?
迷茫
迷茫 2017-04-17 11:49:26
0
2
724
sqlinsert into online_log (time, online) values (1420016061000, 0)

这条语句在mysql5.5上执行没有问题,但是在mysql5.6上执行提示语法错误,我以为这是因为time没加反引号,于是改为

sqlinsert into online_log (`time`, online) values (1420016061000, 0)

结果继续提示语法错误.后来试了一下

sqlinsert into online_log (time, `online`) values (1420016061000, 0)

结果ok了,百思不得其解啊.

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
伊谢尔伦

No, I just used online

伊谢尔伦

http://dev.mysql.com/doc/refman/5.6/en/reserved-words.html

I don’t think mysql has this reserved word

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template