Changing primary keys

Поиск
Список
Период
Сортировка
От Carol Cheung
Тема Changing primary keys
Дата
Msg-id 451AD713.1070103@consumercontact.com
обсуждение исходный текст
Ответы Re: Changing primary keys  (Richard Broersma Jr <rabroersma@yahoo.com>)
Re: Changing primary keys  ("Brandon Aiken" <BAiken@winemantech.com>)
Список 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 по дате отправления:

Предыдущее
От: developer_student
Дата:
Сообщение: Re: Postgre cannot delete from a table
Следующее
От: Richard Broersma Jr
Дата:
Сообщение: Re: Changing primary keys