Here is a script that I got from on of the lists. It should do what you
want.
Ruth
select a.constraint_name, a.r_constraint_name, a.table_name, b.table_name
from dba_constraints a,
dba_constraints b
where a.owner='YOUR_OWNER'
and a.R_CONSTRAINT_NAME is not null
and a.R_constraint_name=b.constraint_name
order by a.table_name;
----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, December 19, 2002 2:14 AM
> Hi all,
>
> How do I find out the direct and indirect foreign key relationships?
> Say, for example there are four tables A, B, C and D of which A is the
> parent table and B, C and D are child tables. Say B and C are related to
A
> directly and D is related to A through C. How do I find out this indirect
> relationship apart from the direct relationships? Any help in this regard
> is very much appreciated.
>
> Thanks and Regards,
>
> Ranganath
>
>
> WARNING: The information in this message is confidential and may be
legally
> privileged. It is intended solely for the addressee. Access to this
message
> by anyone else is unauthorised. If you are not the intended recipient,
any
> disclosure, copying, or distribution of the message, or any action or
> omission taken by you in reliance on it, is prohibited and may be
unlawful.
> Please immediately contact the sender if you have received this message in
> error. Thank you.
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Krishnaswamy, Ranganath
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (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).
>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Ruth Gramolini
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (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).