Search Dependencies of Table in Stored Procedure/Views/Function/Trigger

There are many ways to view Dependencies of Table. One way is right-click on Table and see “View Dependencies”.

Another Way is sp_depends ‘table_name’. But sometime both way doesn’t give accurate answer. At that time following query is helpful

Declare @ParamSearchText varchar(100)
Set @ParamSearchText = 'tbl_name'
            When b.type = 'P' then 'Stored Procedure'
            When b.type = 'V' then 'View'
            When b.type = 'FN' then 'Scalar Function'
            When b.type = 'IF' then 'Inline Table-Valued Function'
            When b.type = 'TF' then 'Table-Valued Function'
            When b.type = 'TR' then 'Trigger'
        Else b.type_desc
     End as ObjectType, + '.' + as ObjectName
From sys.sql_modules a, sys.objects b, sys.schemas c
Where a.[object_id] = b.[object_id]
          and b.[schema_id] = c.[schema_id]
          and a.definition like '%' + @ParamSearchText + '%'
Order by ObjectType, ObjectName

In @ParamSearchText give your Table name.