Multiple Primary Keys

From: Isaías Cristiano Barroso <isaias(at)unimedjm(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Multiple Primary Keys
Date: 2003-01-15 13:14:04
Message-ID: 002301c2bc97$fba87500$0c6aa8c0@unimedjm.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

How to create a table with multiple primary key?
I'm trying this manner but don't work.

CREATE TABLE A ( FIELD1 INT PRIMARY KEY, FIELD2 INT PRIMARY KEY);

and

CREATE TABLE A ( FIELD1 INT , FIELD2 INT , PRIMARY KEY(FIELD1, FIELD2);

But i've the following message:

ERROR: CREATE TABLE / PRIMARY KEY multiple primary keys for table 'A' are not allowed.

How to do?

Best Regards.

Isaías

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aurangzeb M. Agha 2003-01-15 13:43:41 Re: JDBC to PostgreSQL on Cygwin
Previous Message Marcelo Pereira 2003-01-15 13:08:16 Re: JDBC