22,298
社区成员
发帖
与我相关
我的任务
分享
select 0 ,blocked
from (select * from sysprocesses where blocked>0 ) a
where not exists(select * from (select * from sysprocesses where blocked>0 ) b
where a.blocked=spid)
union select spid,blocked from sysprocesses where blocked>0
select 0 ,blocked
from (
select *
from sysprocesses
where blocked>0
) a
where not exists
(
select *
from
(
select * from sysprocesses where blocked>0
) b
where a.blocked=spid
)
UNION
select spid,blocked from sysprocesses where blocked>0