t sql where used list 28table 2fview 29

Solutions on MaxInterview for t sql where used list 28table 2fview 29 by the best coders in the world

showing results for - "t sql where used list 28table 2fview 29"
Juan Pablo
19 Nov 2019
1select schema_name(o.schema_id) + '.' + o.name as [table],
2       'is used by' as ref,
3       schema_name(ref_o.schema_id) + '.' + ref_o.name as [object],
4       ref_o.type_desc as object_type
5from sys.objects o
6join sys.sql_expression_dependencies dep
7     on o.object_id = dep.referenced_id
8join sys.objects ref_o
9     on dep.referencing_id = ref_o.object_id
10where o.type in ('V', 'U')
11      and schema_name(o.schema_id) = 'Person'  -- put schema name here
12      and o.name = 'Person'   -- put table/view name here
13order by [object]
14
similar questions
queries leading to this page
t sql where used list 28table 2fview 29