Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Changing primary keys



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group