Skip to content
  • There are no suggestions because the search field is empty.

T‑SQL Script: Find All Stored Procedures  that reference a Table and Field

T‑SQL Script: Find All Stored Procedures that reference a Table and Field

SELECT 
    o.name AS ProcedureName,
    o.type_desc AS ObjectType
FROM sys.objects o
WHERE o.type = 'P'   -- stored procedures
  AND OBJECT_DEFINITION(o.object_id) LIKE '%tblMemorialInformation%'
  AND OBJECT_DEFINITION(o.object_id) LIKE '%ReceiptNo%'
ORDER BY o.name;