注册 登录
编程论坛 SQL Server论坛

select查询问题

高小 发布于 2010-08-09 15:30, 795 次点击
我现在有一个表table 表中有time 字段,类型为datetime,我想查询比如:10/8/10/9点-11点 这段时间的数据 请问怎么写select语句啊?
3 回复
#2
ironlyl2010-08-09 21:10
select * from table where time=''  就OK了
#3
aei1352010-08-10 08:41
select * from table where convert(varchar(13),time,120) between '2010-08-10 09' and  '2010-08-10 11'
#4
高小2010-08-10 10:47
回复 3楼 aei135
谢谢了!
1