Re: Stupid newbie question about foreign keys

From: Manjula Krishnan <krishnan_at_mailhost.tcs.tulane.edu>
Date: 1998/03/10
Message-ID: <3505709F.7692BDE6_at_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 CET

Original text of this message