Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: re Composite Primary key..?
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
![]() |
![]() |