Re: Multiple Primary Keys

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Isaías Cristiano Barroso <isaias(at)unimedjm(dot)com(dot)br>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Multiple Primary Keys
Date: 2003-01-15 15:00:37
Message-ID: qkta2vc1ubmtbmn55rdv9ocht0c33jvab3@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 15 Jan 2003 11:14:04 -0200, Isaías Cristiano Barroso <isaias(at)unimedjm(dot)com(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-01-15 15:04:24 Re: Multiple Primary Keys
Previous Message Marcelo Pereira 2003-01-15 14:17:30 Re: [JDBC] JDBC