Re: How to create primary key - Mailing list pgsql-general

From Albe Laurenz
Subject Re: How to create primary key
Date
Msg-id D960CB61B694CF459DCFB4B0128514C27F7C41@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: How to create primary key  (Richard Huxton <dev@archonet.com>)
Responses Re: How to create primary key
List pgsql-general
Richard Huxton wrote:
>> What'd be the syntax to create a primary key on an already 
>> build table?
> 
> ALTER TABLE my_table ADD PRIMARY CONSTRAINT (existing_column);

I'm sure it's just a typo, but that is wrong.
It is not ADD PRIMARY CONSTRAINT, but ADD PRIMARY KEY.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "Kynn Jones"
Date:
Subject: Re: How to temporarily disable a table's FK constraints?
Next
From: Richard Huxton
Date:
Subject: Re: How to create primary key