Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Stupid newbie question about foreign keys
I have just done something similar, but I am a newbie too and not strong enough in PLI to do this and did it in VB instead.
What you do is look up table sys.all_constraints for constraints of constraint_type 'R'. This will give the constraint name and the name of the constraint in the foreign table. Next look up the table sys.all_cons_columns for the particular constraint_names and you will get a list of columns included in the constraint column.
Michael Janos
chick*nospam*green_at_gtdev.com wrote in message
<34ff40bc.87926561_at_news.gtdev.com>...
>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?
>
>Thanks, Chick Green
>
>chickgreen_at_gtdev.com
Received on Fri Mar 06 1998 - 00:00:00 CST