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
时间: 2024-10-11 03:29:26