查!
select * from 表名 where 'date(或别的什么)' in(XX.29,XX.30,XX.31)
测试数据
EndDate
2013-05-31 00:00:00
2013-06-01 00:00:00
2013-06-02 00:00:00
2013-06-03 00:00:00
2013-06-04 00:00:00
2013-06-05 00:00:00
2013-06-06 00:00:00
2013-06-07 00:00:00
2013-06-08 00:00:00
2013-06-09 00:00:00
2013-06-10 00:00:00
2013-06-11 00:00:00
2013-06-12 00:00:00
2013-06-13 00:00:00
2013-06-14 00:00:00
2013-06-15 00:00:00
2013-06-16 00:00:00
2013-06-17 00:00:00
2013-06-18 00:00:00
2013-06-19 00:00:00
2013-06-20 00:00:00
2013-06-21 00:00:00
2013-06-22 00:00:00
2013-06-23 00:00:00
2013-06-24 00:00:00
2013-06-25 00:00:00
2013-06-26 00:00:00
2013-06-27 00:00:00
2013-06-28 00:00:00
2013-06-29 00:00:00
2013-06-30 00:00:00
我想选择6月份数据的时候能够带上2013-05-31 00:00:00的数据并且将2013-06-30 00:00:00数据放置到7月份的查询数据中
Where (过期时间 + 1天 - 当前时间) 《 10 10以内过期的
测试数据
EndDate
2013-05-31 00:00:00
2013-06-01 00:00:00
2013-06-02 00:00:00
2013-06-03 00:00:00
2013-06-04 00:00:00
2013-06-05 00:00:00
2013-06-06 00:00:00
2013-06-07 00:00:00
2013-06-08 00:00:00
2013-06-09 00:00:00
2013-06-10 00:00:00
2013-06-11 00:00:00
2013-06-12 00:00:00
2013-06-13 00:00:00
2013-06-14 00:00:00
2013-06-15 00:00:00
2013-06-16 00:00:00
2013-06-17 00:00:00
2013-06-18 00:00:00
2013-06-19 00:00:00
2013-06-20 00:00:00
2013-06-21 00:00:00
2013-06-22 00:00:00
2013-06-23 00:00:00
2013-06-24 00:00:00
2013-06-25 00:00:00
2013-06-26 00:00:00
2013-06-27 00:00:00
2013-06-28 00:00:00
2013-06-29 00:00:00
2013-06-30 00:00:00
我想选择6月份数据的时候能够带上2013-05-31 00:00:00的数据并且将2013-06-30 00:00:00数据放置到7月份的查询数据中