mysql数据库修改一行数据格式不成功问题

举个例子:

mysql数据库中有两个字段publication_time、storage_time,我尝试着一个一个的修改字段的状态

#alter table books modify column `storage_time` timestamp default current_timestamp;
#alter table books modify column `publication_time` set default current_timestamp;

结果总是出问题,后来改成一块儿修改就没问题了:

#alter table books modify column `publication_time` timestamp default current_timestamp not null, modify column `storage_time` timestamp default current_timestamp not null;
原文地址:https://www.cnblogs.com/cjjjj/p/10917297.html