Changing primary keys

Поиск
Список
Период
Сортировка
От Carol Cheung
Тема Changing primary keys
Дата
Msg-id 451AD713.1070103@consumercontact.com
обсуждение исходный текст
Ответы Re: Changing primary keys
Re: Changing primary keys
Список pgsql-novice
Hi,

The table 'house' was created with the below code (partial)

CREATE TABLE house (
   house_id bigserial unique not null,
   phone bigint not null,
   address varchar(75) not null,
   primary key(phone, address)
);

My question is how can I switch the primary key from (phone, address) to
house_id, now that the table is created and records have been inserted.

Thanks,
C

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