本人微信公众号"aeolian"~

SQL Error(1067):Invalid default value for ‘sys_create’

## 报错
SQL Error(1067):Invalid default value for ‘sys_create’
![](https://img2020.cnblogs.com/blog/1208477/202007/1208477-20200723170945462-445445742.png)
## 原因
![](https://img2020.cnblogs.com/blog/1208477/202007/1208477-20200723171102610-1866851452.png)
mysql5.6以后才支持datetime默认为CURRENT_TIMESTAMP,之前的不支持
## 解决方案
方案1.把DEFAULT CURRENT_TIMESTAMP改为DEFAULT NULL
方案2.重装Mysql到5.6以上

点赞

Leave a Reply

Your email address will not be published. Required fields are marked *