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