Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Stupid newbie question about foreign keys
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