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

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting the foreign key constraint info.

Re: Getting the foreign key constraint info.

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Thu, 30 Jun 2005 06:19:58 -0400
Message-ID: <oqadnQxrOfLJWl7fRVn-vw@comcast.com>

"Archie" <nrautela_at_gmail.com> wrote in message news:1120126287.458850.96990_at_g44g2000cwa.googlegroups.com...
> Hi
>
> We know that the syntax to create a foreign key constraint is as
> follows
>
> foreign key(foreignkeycolumn,foreignkeycolumn,...) references
> foreigntable
>
> Now in this the constraint name, the foreignkeycolumn can be easily
> obtained using the user_constraints and User_cons_columns tables.
> However can someone tell me where is the foreigntable name is stored?
>
> Thanks
>

USER_CONSTRAINTS.R_OWNER & R_CONSTRAINT_NAME reference the PK entry in USER_CONSTRAINTS (or ALL_CONSTRAINTS, if a different owner) -- that's where you'll find the referenced table

++ mcs Received on Thu Jun 30 2005 - 05:19:58 CDT

Original text of this message

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