UNSIGNED NOT NULL AUTO_INCREMENT ,
`t1` timestamp NULL DEFAULT NULL COMMENT 'null' ,
`t2` timestamp... NOT NULL COMMENT 'not null' ,
`t3` timestamp NOT NULL ON UPDATECURRENT_TIMESTAMP COMMENT 'not null ...update' ,
PRIMARYKEY (`id`)
)
;
insert into helei(t1,t2,t3) values(null,null,null);
mysql> select * from...不报错,且也插入了当前的时间
explicit_defaults_for_timestamp = 1
insert into helei(t1,t2,t3) values(null,null,null)...;
[SQL]insert into helei(t1,t2,t3) values(null,null,null)
[Err] 1048 - Column 't2' cannot be null
这才是我想要的