Re: Multiple Primary Keys - Mailing list pgsql-general

From Manfred Koizar
Subject Re: Multiple Primary Keys
Date
Msg-id qkta2vc1ubmtbmn55rdv9ocht0c33jvab3@4ax.com
Whole thread Raw
In response to Multiple Primary Keys  (Isaías Cristiano Barroso <isaias@unimedjm.com.br>)
List pgsql-general
On Wed, 15 Jan 2003 11:14:04 -0200, Isaías Cristiano Barroso <isaias@unimedjm.com.br>
wrote:
>CREATE TABLE A ( FIELD1 INT PRIMARY KEY, FIELD2 INT PRIMARY KEY);
>ERROR: CREATE TABLE / PRIMARY KEY multiple primary keys for table 'A' are not allowed.

The error message says it all.

>CREATE TABLE A ( FIELD1 INT , FIELD2 INT , PRIMARY KEY(FIELD1, FIELD2);
                                                                      ^
This should work, if you add a ) here --------------------------------+

Servus
 Manfred

pgsql-general by date:

Previous
From: Marcelo Pereira
Date:
Subject: Re: [JDBC] JDBC
Next
From: Tom Lane
Date:
Subject: Re: Multiple Primary Keys