问题描述
- sqlserver 2008从一张表中查找出在这两个日期(字段为datetime类型)范围内的记录
-
求sql语句!!!sqlserver 2008从一张表中查找出在这两个日期(字段为datetime类型如2015-07-14 09:22:22.343)范围内的记录~
解决方案
select * from table where time1 between time1 and time2
解决方案二:
between 限定符
解决方案三:
SELECT * FROM Books WHERE PublishDate BETWEEN '2015-05-01' AND '2015-05-05'
解决方案四:
.SELECT * FROM Books WHERE PublishDate BETWEEN time1 AND time2
解决方案五:
select * from tab t where t.time between time1 and time2
解决方案六:
select * from table where 你的字段 between '2014-1-1' and '2016-1-1'
时间: 2024-12-31 17:19:06