求一SQL查询语句,查询每天某一时间段记录。

2025-03-23 03:52:57
推荐回答(3个)
回答1:

举例如下:
select * from timetable
where datediff(mi,'2008-10-10 8:00:00',timet)>=1 and datediff (mi,'2008-10-10 9:00:00',timet)<=30

回答2:

select xx from AAA
where datediff(h,8,time)>=0 and datediff(h,9,time)<=0
order by time

回答3:

select xx from AAA
where TIME between '8' and '9'