sql server 2000 小问题 (在线等)

2024-12-23 01:31:25
推荐回答(1个)
回答1:

查询分析器执行

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