Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 52CEB477834 for ; Thu, 7 Nov 2002 10:14:39 -0500 (EST) Received: from ncsmtp02.ogw.rr.com (ncsmtp02.ogw.rr.com [24.93.67.83]) by postgresql.org (Postfix) with ESMTP id 60CC64776BF for ; Thu, 7 Nov 2002 10:12:46 -0500 (EST) Received: from mail8.carolina.rr.com (fe8 [24.93.67.55]) by ncsmtp02.ogw.rr.com (8.12.5/8.12.2) with ESMTP id gA7FCAvL028496 for ; Thu, 7 Nov 2002 10:12:41 -0500 (EST) Received: from srao ([24.74.68.110]) by mail8.carolina.rr.com with Microsoft SMTPSVC(5.5.1877.757.75); Thu, 7 Nov 2002 10:12:14 -0500 From: "Sangeetha Rao" To: Subject: Re: primary keys Date: Thu, 7 Nov 2002 10:12:59 -0500 Message-ID: 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 IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <010c01c28665$2ef19b80$2766f30a@development.greatgulfhomes.com> Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/100 X-Sequence-Number: 10242 How do you select these sub Primary Keys? I tried using Shift-Select, Ctrl_Selec, but doesn't work. Thanks Sangeetha -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of terry@greatgulfhomes.com Sent: Thursday, November 07, 2002 8:54 AM To: 'Huub'; pgsql-sql@postgresql.org Subject: Re: [SQL] primary keys 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 > ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly