Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 15028476EA0 for ; Thu, 7 Nov 2002 08:58:39 -0500 (EST) Received: from ashtonwoodshomes.com (unknown [216.94.125.242]) by postgresql.org (Postfix) with ESMTP id 9D042476082 for ; Thu, 7 Nov 2002 08:55:27 -0500 (EST) Received: from greatgulfhomes.com. (IDENT:root@[216.191.203.109]) by ashtonwoodshomes.com (8.11.6/8.11.6) with ESMTP id gA7EF3o31597; Thu, 7 Nov 2002 09:15:03 -0500 Received: from terrynew2 (firewall.development.greatgulfhomes.com [216.191.203.106]) by greatgulfhomes.com. (8.11.6/8.11.6) with SMTP id gA7DvsR29513; Thu, 7 Nov 2002 08:57:54 -0500 From: terry@greatgulfhomes.com To: "'Huub'" , Subject: Re: primary keys Date: Thu, 7 Nov 2002 08:54:24 -0500 Message-ID: <010c01c28665$2ef19b80$2766f30a@development.greatgulfhomes.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 In-Reply-To: Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/96 X-Sequence-Number: 10238 A table can only have ONE primary key. It can have additional indexes with a UNIQUE restriction, thereby forcing the second field to be as good as a primary key. That is probably what you are looking for, however, you can also in PG Admin II select multiple fields as being the member of the primary key. Terry Fielder Network Engineer Great Gulf Homes / Ashton Woods Homes terry@greatgulfhomes.com > -----Original Message----- > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Huub > Sent: Wednesday, November 06, 2002 9:19 AM > To: pgsql-sql@postgresql.org > Subject: [SQL] primary keys > > > Hi, > > I want to create a table which has 2 columns, and both > columns have to > be primary key (or: together they are the primary key). How can I do > this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. > > Thanks > > Huub > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >