Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to get the list of tables used in a view?

RE: How to get the list of tables used in a view?

From: ASHOKE MANDAL <ashoke_mandal_at_hotmail.com>
Date: Fri, 13 Jul 2001 07:24:23 -0700
Message-ID: <F001.00349B9D.20010713061051@fatcity.com>

Bruce,

Thanks for your useful reply,
Ashoke

>From: "Reardon, Bruce (CALBBAY)" <Bruce.Reardon_at_comalco.riotinto.com.au>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: RE: How to get the list of tables used in a view?
>Date: Thu, 12 Jul 2001 20:15:44 -0800
>
>Hi Ashoke,
>
>Under 817 you can use dba_dependencies - their may be other ways as well.
>
>For example:
>
>SQL> create table a (a integer);
>
>Table created.
>
>SQL> create table b (b integer);
>
>Table created.
>
>SQL> create view ab as select * from a,b where a=b;
>
>View created.
>
>SQL> select * from dba_dependencies where NAME = 'AB';
>
>OWNER NAME TYPE REFERENCED_OWNER REFERENCED_NAME
>REFERENCED_T REFERENCED_LINK DEPE
>---------- ---------- ---- ------------------------------ ---------------
>------------ --------------- ----
>USER000001 AB VIEW USER000001 B
>TABLE HARD
>USER000001 AB VIEW USER000001 A
>TABLE HARD
>
>2 rows selected.
>
>Searching dba_views.text will be a problem if the table names are split
>over
>more than 1 line in the view definition.
>
>Regards,
>Bruce Reardon
>
>-----Original Message-----
>Sent: Friday, 13 July 2001 1:10
>
>Greetings,
>
>Is there any dictionary table/view where I can query the name of all the
>tables used by a particular view?
>
>The way I do now is : Query the line containing 'from' in text field of
>dba_views for the specified view.
>
>Is there any other way to get the list of the tables used by a view?
>
>Thanks,
>Ashoke
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Reardon, Bruce (CALBBAY)
> INET: Bruce.Reardon_at_comalco.riotinto.com.au
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).



Get your FREE download of MSN Explorer at http://explorer.msn.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: ASHOKE MANDAL
  INET: ashoke_mandal_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jul 13 2001 - 09:24:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US