Re: How to create primary key

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: How to create primary key
Дата
Msg-id 473030A0.4070600@archonet.com
обсуждение исходный текст
Ответ на How to create primary key  (Reg Me Please <regmeplease@gmail.com>)
Ответы Re: How to create primary key
Re: How to create primary key
Список pgsql-general
Reg Me Please wrote:
> Hi all.
>
> What'd be the syntax to create a primary key on an already build table?

Hmm - so you want to sort of alter a table and add a primary key
constraint to an existing column?

ALTER TABLE my_table ADD PRIMARY CONSTRAINT (existing_column);

All in the manuals:
http://www.postgresql.org/docs/8.2/static/sql-altertable.html

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Reg Me Please
Дата:
Сообщение: How to create primary key
Следующее
От: Reg Me Please
Дата:
Сообщение: Re: Locale and indexes: howto?