用current_timestamp,不过这个默认值只用在timestamp的列,对datetime列无效
    create table default_time (
    
    id int not null primary key auto_increment,
    
    name varchar(20) default ‘chenlb’,
    
    my_time timestamp default current_timestamp
    
    );
   
Mysql中更新某天数据可设置该条数据中的某个字段自动更新
ALTER TABLE `表名` MODIFY `字段名` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
 
