Re: How to create primary key

From: Samantha Atkins <sjatkins(at)mac(dot)com>
To: rod(at)iol(dot)ie
Cc: Reg Me Please <regmeplease(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to create primary key
Date: 2007-11-06 09:38:31
Message-ID: 54B35BA5-DA2B-42D7-968F-4493094168C9@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Nov 6, 2007, at 1:15 AM, Raymond O'Donnell wrote:

> On 06/11/2007 08:54, Reg Me Please wrote:
>
>> What'd be the syntax to create a primary key on an already build
>> table?
>
> ALTER TABLE test ADD CONSTRAINT test_pk PRIMARY KEY (f1);
>

So, ALTER TABLE test ADD PRMARY KEY(f1 [, ... ] )
isn't enough? It appears in the examples. What more does the
explicit test_pk do that wouldn't happen anyway?

- samantha

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-11-06 09:57:00 Re: How to create primary key
Previous Message Raymond O'Donnell 2007-11-06 09:15:45 Re: How to create primary key