Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f422uYd39491; Tue, 1 May 2001 22:56:34 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f41FDTO97852; Tue, 1 May 2001 11:13:29 -0400 (EDT) (envelope-from news) From: "Thomas F. O'Connell" X-Newsgroups: comp.databases.postgresql.admin, comp.databases.postgresql.general, comp.databases.postgresql.questions Subject: Re: Primary Keys Date: Tue, 01 May 2001 10:13:28 -0500 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 24 Message-ID: <3AEED298.2080804@monsterlabs.com> References: <9ckl5q$2jp4$1@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org User-Agent: Mozilla/5.0 (Macintosh; N; PPC; en-US; 0.8.1) Gecko/20010326 X-Accept-Language: en To: pgsql-admin@postgresql.org.pgsql-general@postgresql.org X-Archive-Number: 200105/1 X-Sequence-Number: 1331 Brian Z wrote: > How can you create a Primary Key which contains multiple columns on for a > table. first of all, i recommend checking out the syntax for the CREATE TABLE command. it's available here: http://postgresql.readysetnet.com/users-lounge/docs/7.1/postgres/sql-createtable.html for a quick example, though: create table foo ( bar int4, baz int4, ola int4, primary key( bar, baz ) ); this statement will make the columns bar and baz coincidentally the primary key for the table foo. -tfo