查询SQLSERVER 中,某个存储过程被多少其他存储过程引用

SELECT
a.object_id,a.name,a.type,b.definition,b.uses_ansi_nulls,b.uses_quoted_identifier
FROM
sys.objects a INNER JOIN sys.sql_modules b ON a.OBJECT_ID = b.OBJECT_ID
WHERE
type = 'P'
--AND a.name<>'Your Proc Name'
AND CHARINDEX('排班表同步医师排班',b.definition)>0

posted @ 2023-11-07 08:30  秋刀鱼罐头  阅读(44)  评论(0编辑  收藏  举报