Re: Foreign Keys in oracle

From: Edgardo Burin <emburin_at_yahoo.com>
Date: 28 Mar 2003 06:31:05 -0800
Message-ID: <9b21c3cf.0303280631.32cdbe3e_at_posting.google.com>


BUBBLE_at_VODAFONE.IE (Gearoid) wrote in message news:<37c7ae20.0303280338.3bfa4337_at_posting.google.com>...
> i have a primary key in one table consisting of three fields, i want
> to use this composite key as a foregin key in another table but i am
> getting errors.if anyone out there can help me please getback to me
> asap.

i created this 2 tables and got no problem

create table a (

a1 number,
a2 number,
a3 number,

constraint a_pk01 primary key (a1,a2,a3) )
/
create table b (
b1 number,
b2 number,
b3 number,

constraint b_fk01 foreign key (b1,b2,b3) references a(a1,a2,a3) )
/

you got problems when using partial composite keys for fk

regards
Edgardo Received on Fri Mar 28 2003 - 15:31:05 CET

Original text of this message