SQL Server 求结果
;with cte as (
select CONVERT(DATE, DATEADD(DAY, -9, GETDATE())) as paytime
union all
select dateadd(day,1,paytime) from cte where paytime<GETDATE()
)
select * from cte a
-----------猜猜结果是什么,下面的
paytime
2015-10-31
2015-11-01
2015-11-02
2015-11-03
2015-11-04
2015-11-05
2015-11-06
2015-11-07
2015-11-08
2015-11-09
2015-11-10