SELECT referencing_schema_name, referencing_entity_name, referencing_id, referencing_class_desc, is_caller_dependent
FROM sys.dm_sql_referencing_entities ('dbo.product_category', 'OBJECT');
GO
如果对SQL Server中某个表,查询用到该表的存储过程及View,可以用以上语句直接查出。
Ref.
View the Dependencies of a Stored Procedure
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12707874/viewspace-3038412/ ,如需转载,请注明出处,否则将追究法律责任。