create table #timeseries(Times datetime not null) go declare @firstdate datetime , @lastdate datetime declare @MI int begin set @firstdate='8/8/2012 6:00' set @lastdate ='8/9/2012 6:00' set @MI=datediff(MI,@firstdate,@lastdate) --嵌套循环 while(@MI>=0) b…