请教:如何读取某个时间段之间的数据
只要sql语句比如:
select * from * where 时间 between '23:55:40' and '00:58:40'
我想要从23:55:40到00:58:40这63分钟之间的数据
上面的时间段应该怎么改???
谢!
[CODE]create table #t(
starttime datetime,
endtime datetime
)
go
insert #t select '1988-01-02 05:06:10','1988-01-02 10:06:10'
union all select '2007-10-02 15:06:30','1988-01-02 10:06:10'
union all select '2007-10-05 23:55:40','2007-10-06 00:58:40'
union all select '1986-05-05 20:06:50','1986-05-05 21:06:10'
select starttime,endtime from #t where datediff(minute,starttime,endtime)=63
drop table #t[/CODE]