标签:
declare @stime datetime; declare @etime datetime set @stime =‘2015-01-01‘ set @etime=‘2015-02-01‘ insert into send_SMS_Log (Tdatetime) select @stime while @stime<DATEADD(DAY,-1,@etime) begin insert into send_SMS_Log (Tdatetime) select DATEADD(DAY,1,@stime) set @stime=DATEADD(DAY,1,@stime) end
标签:
原文地址:http://www.cnblogs.com/Warmsunshine/p/4290350.html