sql add default constraint

Add table constraints when creating a table

create table table_name (
id int primary key auto_increment, 
actionTime datetime default current_timestamp); // 添加默认时间

Add default constraints to fields in the current table

alter table table_name modify actionTime datetime default current_timestamp;

Guess you like

Origin blog.csdn.net/ff_hh/article/details/88126520