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

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

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

SELECT 
    v.name AS ViewName,
    v.type_desc AS ObjectType
FROM sys.views v
WHERE OBJECT_DEFINITION(v.object_id) LIKE '%tblMemorialInformation%'
  AND OBJECT_DEFINITION(v.object_id) LIKE '%ReceiptNo%'
ORDER BY v.name;