Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Composite Primary Key...?
When creating a composite primary key in Oracle, you will want to
include *all* columns in the PK constraint definition. You are most
likely trying to add a column to the PK constraint and your syntax is
telling Oracle to add a new PK constraint. You can't have two. So drop
the PK constraint. Then add it again, specifying the multiple columns
that compose the composite primary key.
HTH,
Brian
dave wrote:
>
> I am a student learning Database Modelling and we are using Sql*Plus as our
> tool.
> My text book talks about the "viability" of using a composite primary
> key......
> This is mentioned in say Chapter 3 of a 10 chapter text....
> If I try to create a "composite" primary key in Oracle I get the
> message that:
> "table can only have one primary key". I have read ahead and checked
> out normalization..
> sooooo.... can I assume that Oracle only "Accepts" Create Table with
> the said
> table in 3rd Normal Form.... Or am I simply getting the syntax
> wrong.....
> Or am I out to lunch........
> Any advice help would be appreciated D.Moore (45 year old rookie
> student)
-- =================================================================== Brian Peasland oracle_dba_at_remove_spam.peasland.com Remove the "remove_spam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three"Received on Thu Jun 12 2003 - 07:48:02 CDT
![]() |
![]() |