MySQL创建表时,设置自动插入当前时间字段的两种格式
😂 这篇文章最后更新于2052天前,您需要注意相关的内容是否还可用。
1.timestamp类型
create table manager(
id int not null primary key,
mdate timestamp not null default current_timestamp
);
2.datetime类型
create table manager(
id int not null primary key,
mdate datetime
);
留言评论
暂无留言