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;

 

posted @ 2019-05-24 11:58  泥土里的绽放  阅读(657)  评论(0编辑  收藏  举报