1064- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/wangchun159753/article/details/100763326

当使用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

解决方案:在默认值两边添加单引号

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/wangchun159753/article/details/100763326