查询某个数据库下所有用到某张数据表的数据库对象: 存储过程 或 视图
-- use YourDbName declare @tblName varchar(100)='Feed' select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('P','V','AF') and b.[definition] like '%' + @tblName + '%' order by a.[name] asc
查询结果