查询在某一时间段内的数据
1,查询某一天的几点到某一天的几点的数据
select * from info where time>2022-1-1 00:00:00 and time<2022-5-1 00:00:00
2,查询每一天某一时间段的数据
#例如查询的是每天凌晨到六点的数据
select * from info where hour(time) between 00 and 06
1,查询某一天的几点到某一天的几点的数据
select * from info where time>2022-1-1 00:00:00 and time<2022-5-1 00:00:00
2,查询每一天某一时间段的数据
#例如查询的是每天凌晨到六点的数据
select * from info where hour(time) between 00 and 06