Find where specific table or view is used in Azure SQL Database

Article for: SQL Server Oracle database

Query below list objects where specific table or view is used.


select schema_name(o.schema_id) + '.' + as [table],
       'is used by' as ref,
       schema_name(ref_o.schema_id) + '.' + as [object],
       ref_o.type_desc as object_type
from sys.objects o
join sys.sql_expression_dependencies dep
     on o.object_id = dep.referenced_id
join sys.objects ref_o
     on dep.referencing_id = ref_o.object_id
where o.type in ('V', 'U')
      and schema_name(o.schema_id) = 'Person'  -- put schema name here
      and = 'Person'   -- put table/view name here
order by [object]


  • table - provided table/view schema name and name
  • ref - string 'is used by'
  • object - name of object with schema name which use specific procedure
  • object_type - type of found object


  • One row represents one object
  • Scope of rows: all objects that are using provided table/view
  • Ordered by schema name, object name

Sample Results

List of objects that are using Person.Person table in AdventureWorks2017 database.

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
There are no comments. Click here to write the first comment.