SELECT SCHEMA_NAME(t.schema_id) [Owner],
t.name [TableName]
FROM sys.tables t
WHERE is_ms_shipped = 0
AND not EXISTS (SELECT *
FROM sys.sql_expression_dependencies d
WHERE d.referenced_entity_name = t.name
AND (( is_ambiguous = 1 or is_caller_dependent=1)
OR
d.referenced_id = t.object_id) )
No comments:
Post a Comment