mysql 查询当天,一周,一月的查询语句

select * from `t_exer_record_88` where   DATE_SUB(CURDATE(), INTERVAL 7 DAY)<= date(update_time);
select * from `t_exer_record_88` where   DATE_SUB(CURDATE(), INTERVAL 1 MONTH )<= date(update_time);
select * from `t_exer_record_88` where  date(update_time) = curdate(); 
select * from `t_exer_record_88` where  to_days(update_time )= to_days(now());

猜你喜欢

转载自blog.csdn.net/weixin_40161254/article/details/84068120