Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9C6AF47745E for ; Thu, 7 Nov 2002 10:05:37 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id D8C4E476D0E for ; Thu, 7 Nov 2002 09:29:42 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 89CE9381C03; Thu, 7 Nov 2002 09:29:23 -0500 (EST) From: Huub X-Newsgroups: comp.databases.postgresql.sql Subject: Re: primary keys Date: Thu, 07 Nov 2002 15:29:35 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 56 Message-ID: References: <010c01c28665$2ef19b80$2766f30a@development.greatgulfhomes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en In-Reply-To: <010c01c28665$2ef19b80$2766f30a@development.greatgulfhomes.com> To: pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/103 X-Sequence-Number: 10245 terry@greatgulfhomes.com wrote: > 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 Thanks..problem solved.. Huub