Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql server find all referencing objects to user-defined table type

-- Find all referencing objects to user-defined table type
SELECT ROW_NUMBER() OVER (ORDER BY OBJECT_NAME(m.object_id)) RowId, definition
FROM sys.sql_expression_dependencies d
JOIN sys.sql_modules m ON m.object_id = d.referencing_id
JOIN sys.objects o ON o.object_id = m.object_id
WHERE referenced_id = TYPE_ID('NAME_OF_TABLE_TYPE')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #server #find #referencing #objects #table #type
ADD COMMENT
Topic
Name
9+3 =