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

Home -> Community -> Usenet -> c.d.o.server -> How do you create a double-primary key?

How do you create a double-primary key?

From: Francesco Marchioni <Francesco.Marchioni_at_intra.lastminutetour.com>
Date: Tue, 19 Sep 2000 16:10:46 +0200
Message-ID: <8q7ruq$g9o$1@marte.lastminutetour.com>

Hello,
I'd like to know how can I create a table with a double primary key? I mean I have two keys

ID1 ID2

and it's legal to have duplicates of ID1 or duplicates of ID2 but not of ID1 and ID2 together.
Example:

ID1 ID2

1        5        Ok
1        4        Ok
3        4        Ok
1        5        Wrong. I don't want to allow this!

Does anybody know how to do it?
Thanks
Francesco Received on Tue Sep 19 2000 - 09:10:46 CDT

Original text of this message

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