| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Referential constraints
Here's a script that gives the foreign of one of your table (parameter &1).
Break On fk Skip 1 On reftab On pk
Spool FKList
Select cons.constraint_name fk,
col.column_name fkcol,
cons2.table_name reftab,
cons2.constraint_name pk,
col2.column_name pkcol
from user_cons_columns col2, user_cons_columns col,
user_constraints cons2, user_constraints cons
where col2.owner = cons.r_owner
and cons.owner = user
and cons.table_name = upper('&1')
and cons.constraint_type = 'R'
Spool off
---------------------- FKList.sql -------------------------
-- Have a nice day Michel Johan den Boer <jj.den.boer_at_hccnet.nl> a écrit dans le message : 39ABD6DD.C9DEBF09_at_hccnet.nl...Received on Wed Aug 30 2000 - 01:37:01 CDT
> Hi,
>
> I am looking for a script which can display the referential
> constraints between tables and their columns.
> Does anyone know a good website to get such scripts ?
> --
> Regards
>
> Johan den Boer
> email : jj.den.boer_at_hccnet.nl
![]() |
![]() |