Re: Relation ship
From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Fri, 08 Aug 2003 08:22:48 -0700
Message-ID: <3F33C048.11781B0D_at_exxesolutions.com>
AND R.owner = T.owner;
Date: Fri, 08 Aug 2003 08:22:48 -0700
Message-ID: <3F33C048.11781B0D_at_exxesolutions.com>
MeDhanush wrote:
> Hi,
>
> I have huge number of tables in db..,I'm trying to find out the
> relationship among the tables(like master/detail)..,
> Can sb tell me any tool or method that can help me out ?
>
> TIA
> Kishroe
[Quoted] Tools ... any entity relationship diagraming ... Designer, ERwin, Visio Professional
Otherwise ...
SELECT T.owner AS CHILD_OWNER,
T.table_name AS CHILD_TABLE,
T.constraint_name AS FOREIGN_KEY_NAME,
R.owner AS PARENT_OWNER,
R.table_name AS PARENT_TABLE,
R.constraint_name AS PARENT_CONSTRAINT
FROM dba_constraints T, dba_constraints R
WHERE T.r_constraint_name = R.constraint_name AND T.r_owner = R.owner AND T.constraint_type='R'
AND R.owner = T.owner;
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Fri Aug 08 2003 - 17:22:48 CEST
