一、时间
①对时间进行加减计算
date_add(now(), interval 1 day) 当前时间 +1 天
date_add(now(), interval -1 day) 当前时间 -1天
date_sub(now(), interval 1 day) 当前时间 -1 天
②时间格式化显示
data_format(now(), '%Y-%m-%d %H:%i:%s)
③ 获取当前时间
now() //当前时间 2018-7-25 10:04:43
CURDATE() //当前时间 2018-7-25
④时间减时间
(UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(create_time))/24/60/60 as "overTime"
二、字段 表 的备注说明
//修改字段备注
alter table test1 modify column field_name int comment '修改后的字段注释';
//修改表的备注
alter table test1 comment '修改后的表的注释';