我得到了下表,我想在两次之间排除?
Server = new FancyWebSocket('wss://www.myserver.com:9401');
如果当前时间为declare @t table (id int, name varchar(50), starttime time(3),endtime time(3))
insert into @t
( id, name, starttime, endtime )
values ( 1,'Steve','00:00:00.000','23:59:59.999')
,( 2,'Steve','03:00:00.000','04:00:00.000')
,( 3,'Steve','00:00:00.000','23:59:59.999')
,( 4,'Steve','09:30:00.000','11:30:00.000')
,那么我希望在时间之间排除
'03:10:00.000'
任何帮助?感谢
答案 0 :(得分:3)
试试这个(假设你有一个名为currenttime
的时间变量):
SELECT id, name, starttime, endtime
FROM @t
WHERE starttime > currenttime OR endtime < currentTime