版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
当使用navicat创建表为类型为datetime的字段设定默认值为**‘0000-00-00 00:00:00’**的时候报错:
1064- 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 '-00-00 00:00:00' AFTER 'createtime' at line 3
解决方案:在默认值两边添加单引号