Add quto increment to existing column

Поиск
Список
Период
Сортировка
От Robert Buckley
Тема Add quto increment to existing column
Дата
Msg-id 1317708841.25240.YahooMailNeo@web24103.mail.ird.yahoo.com
обсуждение исходный текст
Ответы Re: Add quto increment to existing column
Re: Add quto increment to existing column
Список pgsql-general
Hi,

I have a column in a table called hist_id with the datatype "integer". When I created the table I assigned this column the primary key constraint but didn´t make it an auto-increment column.

How could I do this to an the already existing column?

I have created the sequence with the following command but don´t know how to change the existing column to auto-increment.


$ create sequence hist_id_seq;

thanks for any help,

Rob



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

Предыдущее
От: senthilnathan
Дата:
Сообщение: PG Source Compilation (Optional Features / Optional Packages)
Следующее
От: DUPREZ Cédric
Дата:
Сообщение: Re: Problem with pg_upgrade from 9.0 to 9.1 under Ubuntu x64