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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Getting column relationship

Re: Getting column relationship

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 18 Apr 2001 16:46:49 +0200
Message-ID: <j2ardt47aj10abnie1830jm9kp09h3iv08@4ax.com>

On Wed, 18 Apr 2001 14:26:59 +0700, "Chang Houw" <exortica_at_bigfoot.com> wrote:

>Hi how do i get column relationship on oracle 8i ? for example Suppcode is
>foreign key from
>table Supplier and column Suppcode. I tried to use all_constraint table but
>there's no column information
>there just constraint and table name.

join all_constraints with all_cons_columns, just in the same fashion as user_indexes and user_ind_columns
For foreign keys
select *
from all_constraints c1, all_constraints c2, all_cons_columns cc where c2.constraint_name = c1.r_constraint_name

Hope you get the gist of it now.

Hth,

Sybrand Bakker, Oracle DBA Received on Wed Apr 18 2001 - 09:46:49 CDT

Original text of this message

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