Find Oracle views using specific table

  Uncategorized

Sometimes you want to find all views using a specific database table in Oracle. If you are using a small amount of views, this is not an issue, but if you have a huge Oracle database with thousands of views using hundreds of tables you need help from your database.

In this case there is a handy small select statement which can be used to find all Oracle views using specific table in your database. It uses the “SYS.ALL_DEPENDENCIES” view which is provided by oracle.

select NAME 
  from SYS.ALL_DEPENDENCIES
where 
    type='VIEW'
    and REFERENCED_NAME like '%[YOUR_TABLE_NAME]%'
    and REFERENCED_TYPE = 'TABLE'

With this simple select statement you will get a list of all view names using your specific table.

Source:
https://stackoverflow.com/questions/21019584/list-of-oracle-views-using-specific-table-name/21020091