Re: How to create primary key

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Reg Me Please *EXTERN*" <regmeplease(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to create primary key
Date: 2007-11-06 12:07:49
Message-ID: D960CB61B694CF459DCFB4B0128514C27F7BA1@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Reg Me Please wrote:
> What'd be the syntax to create a primary key on an already
> build table?

As described in the documentation:

ALTER TABLE <name> ADD [CONSTRAINT <constraint name>]
PRIMARY KEY (<colname> [, ...])
[WITH (FILLFACTOR = <number>)] [USING INDEX TABLESPACE <tbsp name>]

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2007-11-06 12:15:59 Re: How to create primary key
Previous Message Raymond O'Donnell 2007-11-06 11:06:44 Re: How to create primary key