select distinct x.name,y.name from
(
select sc.id, sc.text,sj.name from syscomments sc ,sysobjects sj
where patindex('%'+sj.name+'%',sc.text)>0 and sj.type='U'
) x
left join
(
select distinct a.id, name,text
from syscomments a,sysobjects b
where a.id=b.id and b.xtype='p'
) y
on x.id = y.id
where y.name is not null
order by x.name
表与存储过程关系
最新推荐文章于 2022-10-22 17:40:09 发布