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

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

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

SELECT 
    o.name AS FunctionName,
    o.type_desc AS ObjectType
FROM sys.objects o
WHERE o.type IN ('FN','IF','TF')   -- scalar, inline TVF, multi‑statement TVF
  AND OBJECT_DEFINITION(o.object_id) LIKE '%tblMemorialInformation%'
  AND OBJECT_DEFINITION(o.object_id) LIKE '%ReceiptNo%'
ORDER BY o.name;