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: Michael Janos <mjanos_at_shoal.net.au>
Date: 1998/03/06
Message-ID: <6do09k$cr6$1@floyd.ideal.net.au>#1/1

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

Original text of this message

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