Mysql常用知识点

一、时间字段自动更新

create table `stu` (
'id' int not null auto_increment,
'createtime' timestamp default current_timestamp comment '创建时间',
'moditiytime' timestamp default current_timestamp on update current_timestamp  comment '更新时间',
primary key ('id'));

#创建时间取默认值,更新时间增加自动更新。

二、

posted @ 2020-08-13 09:14  Water540  阅读(62)  评论(0编辑  收藏  举报