Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Getting column relationship
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
![]() |
![]() |