Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting the foreign key constraint info.
"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
![]() |
![]() |