Hi Ganesh,
From the error I understood that. Any reasons behind that. I am trying to
understand the logic behind that.
Because the composite primary key is a constrain it just ensure the data is
unique for that table only (tableA), but the column c1 and c2 has its own
values, so why not I refer them in FK of tableB.
Please shed some light.
Regards
Kumar
----- Original Message -----
From: <ganesh.[Email Address Removed] "Kumar" <[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] Friday, October 31, 2003 11:07 AM
Subject: Re: Unable to reference a composite key as FK
> That is Not allowed... The FK Should Refer to a PK/UK...
>
> HTH
>
> Regards,
> Ganesh R
> Mantas Implementation Team
> DID : (+65) 6231-8719
> HP : (+65) 9067-8474
> ===========================================
> Live to learn... forget... and learn again.
> ===========================================
>
>
>
>
>
>
>
> "Kumar"
> <[Email Address Removed] To: "LazyDBA.com
Discussion" <[Email Address Removed] m.sg> cc:
> Subject: Unable to
reference a composite key as FK
> 10/31/03 12:03
> PM
> Please respond
> to "Kumar"
>
>
>
>
>
>
> Dear friends,
>
> I have encountered a problem in referencing a member of a composite key as
> a FK in another table.
>
> table A
> c1,c2,c3,c4
>
> tableB
> c7,c8,c9
>
> For 'tableA' I have a composite primary key on columns c1+c2.
>
> I wanted to make a relationship(FK) for the 'c7' in 'tableB' with the
'c2'
> of 'tableA'. But it showed me an error
> The columns in 'tableA' do not match an existing primary key or unique
> constraint
>
> Is this not allowed in relational databases? Somebody pls enlighten me
with
> the concept behind this.
>
> Regards
> Kumar
>
>
>
> --------------------------------------------------------------------------
-
> This message (including any attachments) is confidential and may be
> privileged. If you have received it by mistake please notify the sender by
> return e-mail and delete this message from your system. Any unauthorised
> use or dissemination of this message in whole or in part is strictly
> prohibited. Please note that e-mails are susceptible to change.
> ABN AMRO Bank N.V. (including its group companies) shall not be liable for
> the improper or incomplete transmission of the information contained in
> this communication nor for any delay in its receipt or damage to your
> system. ABN AMRO Bank N.V. (or its group companies) does not guarantee
that
> the integrity of this communication has been maintained nor that this
> communication is free of viruses, interceptions or interference.
> --------------------------------------------------------------------------
-
>
>
Oracle LazyDBA home page