Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: multiple primary keys
Hi,
I am only new to this but I don't think that you can have more than one primary key per table. In many ways, primary keys are similiar to unique key - although I have yet to know what the main difference between they are.
Anyway, after all that - to create primary key on a table, you do :
CREATE TABLE table_name(
column_1A varchar2, column_2A varchar2,
For have another table reference to the above tables Primary key as a foreign key,
CREATE TABLE table_2(
column_1B varchar2, column_2B varchar2, CONSTRAINT table_2_fk FOREIGN KEY(column_1B) REFERENCES table_name(column_1A));
On Fri, 29 Sep 2000 11:22:05 +0200, NightWing <NightWing_at_wanadoo.nl> wrote:
>I'm a newbie, and I need some help with this:
>Can someone give me the SQL creationscript to make a the following two
>tables:
>A table that has 3 primary keys.
>A table that refers to the table containing containing the 3 primary
>keys.
>
>I can fill in the datatypes myself. I just need to know how to make
>the above construction.
>
>NightWing
>(-=\V/=-)
Received on Fri Sep 29 2000 - 04:48:29 CDT
![]() |
![]() |