SELECT一段时间的数据的SQL语句怎么写,两个时间之间的

如题所述

第1个回答  2013-08-16
select * from 表 where 时间字段 between 时间1 and 时间2
第2个回答  2013-08-16
select * from 表 where 时间字段 >='2009-12-18 00:00:00' and 时间字段 <='2009-12-19 00:00:00' select * from 表 where 时间字段 >=convert(datetime,'2009-12-18') and 时间字段 <=convert(datetime,'2009-12-19')
第3个回答  2013-08-16
select * from table where time >= '2009-1-1' and time <= '2009-12-1'
第4个回答  2017-08-25
select * from 表 where a1<=b2 and a2>=b1
同一类最小的小于另一类最大的 ,同一类最大的大于另一类最小的,然后用and 连接取两者都满足的。
第5个回答  2013-08-16
where 字段 between ‘2000/01/01’ and ‘2009/01/01’
相似回答