实现建表时对应字段(修改时间)自动生成当时系统时间

在建表时:

`create_time` timestamp not null default current_timestamp comment'创建时间',--将系统当前时间设为默认值
`update_tiem` timestamp not null default current_timestamp on update current_timestamp comment'修改时间',   --将系统当前时间设为默认值,同时更新时替换为更新时的系统时间

 

将系统当前时间设为默认值
posted @ 2020-06-10 23:44  shouyaya  阅读(589)  评论(0编辑  收藏  举报