Re: add primary key
От | Oliver Elphick |
---|---|
Тема | Re: add primary key |
Дата | |
Msg-id | 200103131818.f2DIIxG13018@linda.lfix.co.uk обсуждение исходный текст |
Ответ на | RE: add primary key ("mikhail malamud" <mikhail.malamud@drexel.edu>) |
Список | pgsql-novice |
"mikhail malamud" wrote: >I ve been trying to find an answer to this question but all in vain. Can >someone pleease help me. How do you add a primary key constraint to an >existing table. > > > >-----Original Message----- >From: pgsql-novice-owner@postgresql.org >[mailto:pgsql-novice-owner@postgresql.org]On Behalf Of mikhail malamud >Sent: Saturday, March 10, 2001 10:55 PM >To: pgsql-novice@postgresql.org >Subject: [NOVICE] add primary key > > >ALTER TABLE Activity add > CONSTRAINT PRIMARY KEY > ( > ActivityId > ) >What's wrong with this. How do I add primary key constraint. The facility is not supported, even at 7.1 Dump your database with pg_dump, edit the dump file and reload it. If the facility were supported, the command would be: ALTER TABLE Activity ADD CONSTRAINT Activity PRIMARY KEY(ActivityId) -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Who is like Thee among the gods, O Lord? Who is like Thee, majestic in holiness, awesome in praises, working wonders?" Exodus 15:11
В списке pgsql-novice по дате отправления: