查询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