在MySQL 5.7中创建具有NULL时间戳列的表

时间:2016-11-08 16:07:59

标签: mysql mysql-5.7

`effective_end_utc` timestamp NOT NULL COMMENT 'The UTC timestamp for when the target ceases to be in effect.',

这最终会给我

ERROR 1067 (42000) at line 27: Invalid default value for 'effective_end_utc'

基于其他响应,我甚至在模式开始时将模式设置为跟随

SET GLOBAL SQL_MODE='ALLOW_INVALID_DATES'

任何想法都会出错?

1 个答案:

答案 0 :(得分:0)

The schema should be changed with a default value like

 `reported_timestamp_utc` timestamp NULL DEFAULT NULL COMMENT