Home » SQL & PL/SQL » SQL & PL/SQL » dependency question
dependency question [message #659262] Tue, 10 January 2017 13:19 Go to next message
Messages: 24
Registered: November 2009
Junior Member
create table tab1(x number);

create or replace view v1
select x from tab1;

create or replace view v2
select * from v1;

I am trying to write a query that given a table, gives me all the objects (directly and indirectly) dependent on the table

select *
FROM dba_dependencies
AND referenced_name IN ('TAB1')

the above only gives me V1, what else need I write to get V2, and if V2 is used by is used by a package , then that package name and so on
Re: dependency question [message #659263 is a reply to message #659262] Tue, 10 January 2017 13:52 Go to previous message
Michel Cadot
Messages: 65389
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You have to recursively query.
See the following links:
To get the tree list of the objects depending of an object
To get the tree list of the objects on which an object depends

Previous Topic: separate 2 columns into 2 rows
Next Topic: Recursive SQL Insert
Goto Forum:

Current Time: Fri Feb 23 16:43:59 CST 2018

Total time taken to generate the page: 0.02219 seconds