Re: how to view the all relational links of a specific table to other tables?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 11 Mar 2003 07:05:08 -0800
Message-ID: <2687bb95.0303110705.f97f4e0_at_posting.google.com>


oracleapple_at_yahoo.com (AMY) wrote in message news:<8c698c2f.0303101929.5063ce98_at_posting.google.com>...
> how to view the all relational links of a specific table to other tables?
>
> Thanks!

Amy,

The application design may or may not have the relationships defined in Oracle through PK to FK relationships, but might handle some or all of them purly through code.

If the relationships are defined to Oracle then you can find the FK to PK or UK relationships by looking at dba_constraints. Dba_cons_columns contains the column names involved in constraints.

You can query a list of tables related to a parent by joining dba_constraints to itself:

where b.table_name = upper('&tbl_nm') and a.r_constraint_name = b.constraint_name

Foreign keys have a constraint_type = 'R'. See the Oracle version# Reference manual for information on the Oracle rdbms dictionary views.

HTH -- Mark D Powell -- Received on Tue Mar 11 2003 - 16:05:08 CET

Original text of this message