Primary key on existing table?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This may be a silly question but I don't see any place where the documentation explicitly addresses whether or not you can designate a particular column as a primary key after the table is created. I used the "create table as " syntax to create a table with the same columns as an original table, but I want to rename id column, make it a serial, and designate it as a primary key. Is it possible to do this? I've tried a number of things to do this and none of them have worked.

Carol

--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux