Re: change existing table definition

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

 



On Tuesday 28 June 2005 15:27, Chuming Chen wrote:

Hello,

> How can I change the column definition of an existing table, ie. from
> varchar(30) to varchar(50)? 

You did not mention any version, so for 8.0.x:

alter table t alter col type varchar(50);

> Is there any way to add a new column to an 
> existing table?

alter table t add colum foo varchar(127)

Link tip:

http://www.postgresql.org/docs/8.0/interactive/ddl-alter.html

HTH

Johannes


[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