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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stupid newbie question about foreign keys

Re: Stupid newbie question about foreign keys

From: Manjula Krishnan <krishnan_at_mailhost.tcs.tulane.edu>
Date: 1998/03/10
Message-ID: <3505709F.7692BDE6@mailhost.tcs.tulane.edu>#1/1

chick*nospam*green_at_gtdev.com wrote:

> I'm really new to this, but what I need is a script which will list
> all of the foreign keys for a table, and what table and column they
> come from.
>
> Can anyone help me with this?

select table_name, constraint_name, r_constraint_name , r_owner from all_constraints
where owner = '<OWNER>';

If you :

    desc all_constraints
it will show you the structure of that table and you can select whatever you want out of it.

Manjula Received on Tue Mar 10 1998 - 00:00:00 CST

Original text of this message

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