5 个解决方案
#1
select top 20 * from tb
where date between '2011-04-06 09:00:00.000' and '2011-04-21 10:00:00.000'
#2
select top 20 * from tb where colname>='2011-04-06 09:00:00.000' and
colname<='2011-04-21 10:00:00.000'
#3
select top 20 *
from
tb
where
date between '2011-04-06 09:00:00.000' and '2011-04-21 10:00:00.000'
#4
时间也可以用大于、小于和等于来比较的
SELECT TOP 20 * FROM TABLE WHERE TIME BETWEEN '2011-04-06 09:00' AND '2011-04-21 10:00'
#5
谢谢各位大侠...
#1
select top 20 * from tb
where date between '2011-04-06 09:00:00.000' and '2011-04-21 10:00:00.000'
#2
select top 20 * from tb where colname>='2011-04-06 09:00:00.000' and
colname<='2011-04-21 10:00:00.000'
#3
select top 20 *
from
tb
where
date between '2011-04-06 09:00:00.000' and '2011-04-21 10:00:00.000'
#4
时间也可以用大于、小于和等于来比较的
SELECT TOP 20 * FROM TABLE WHERE TIME BETWEEN '2011-04-06 09:00' AND '2011-04-21 10:00'
#5
谢谢各位大侠...