mysql查询最近一小时的数据
date_sub()函数:
DATE_SUB(date,INTERVAL expr type)
实例:
SELECT NOW(),DATE_SUB(NOW(),INTERVAL 1 HOUR) as the_time
select * from xxx where create_time > DATE_SUB(NOW(),INTERVAL 1 HOUR);
转自:https://www.cnblogs.com/vijayfly/p/6265871.html