Search code examples
oracleviewfindnames

List of Oracle views using specific table name


I wish to find a list of all views under specific schema using mentioned table name.

e.g. if view1 and view2 uses table1, using table name "table1", I wish to find view names "view1" and view2".

Please let me know, how can I do it.


Solution

  • Use this query:

    SELECT * 
    FROM all_dependencies 
    WHERE TYPE = 'VIEW'
        AND referenced_type = 'TABLE'