摘要:
declare @i int declare @usedate datetime set @i=19582000 while @i<30231929 begin select @usedate = getdate()delete from servicesubscription where subscriptionid <= @i and subscriptionid<=30231928insert into test..aaamovielogs values(@i,@usedate,getdate(),@@rowcount)set @i=@i+1000 if(@i>3 阅读全文
摘要:
declare @sql varchar(100) while 1=1 begin select top 1 @sql = 'kill '+cast(spid as varchar(3)) from master..sysprocesses where spid > 50 and spid <> @@spid if @@rowcount = 0 break exec(@sql) end 阅读全文