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

Home -> Community -> Usenet -> c.d.o.misc -> Re: re Composite Primary key..?

Re: re Composite Primary key..?

From: Christoph Purrucker <gugi_at_bigfoot.de>
Date: Thu, 12 Jun 2003 15:20:41 +0200
Message-ID: <bc9uob$2dp$1@home.itg.ti.com>


Hello Dave,

> Ok i have tried Alter table add Primary key(bla bla bla ) and ran through
> several permuitations..

And what was the result? What was the error message, if any?

> Really what i am trying to figure out Is when reconsiling a M:N
> relationship through
> creating a composite entity..... ie composite "contains" the two
> primary keys of
> related entities.... soooo In creating my composite i try...

Sorry, but English ist not my native language... *confused*

> Create Table CheckOut(VID_NUM NUMBER(8)
> CONSTRAINT CheckOut_VID_NUM_FK
> REFERENCES ForRent(VID_NUM),
> CUS_NUM NUMBER(8)
> CONSTRAINT CheckOut_CUS_NUM_FK
> REFERENCES VCustomer(CUS_NUM));
> TRANS_DATE DATE NOT NULL);
>
>
> But I am not getting how to "Build " the composites primary key from the
> two foreign keys..

Looking at Your text book? Did You try that:

alter table CheckOut add constraint CheckOut_PRIM primary key ( VID_NUM, CUS_NUM );
> Thx very much for your prompt reply .... thx in advance for another :}

Please reply by pressing "reply" in Your news-reader instead of creating a new thread...

cp Received on Thu Jun 12 2003 - 08:20:41 CDT

Original text of this message

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