Re: [GENERAL] Is it possible to change a columns name

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: wim(dot)ceulemans(at)nice(dot)be (Wim Ceulemans)
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Is it possible to change a columns name
Date: 1999-03-10 19:54:49
Message-ID: 199903101954.OAA20469@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi
>
> Is there a simple way to change the name of a column? In addtion, is it
> possible to change a column from 'null' to 'not null' and vice versa?

alter table classname1 [*]
rename [column] attname1 to attname2

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel PaJaSoft Janousek 1999-03-10 20:26:32 Re: [GENERAL] Is it possible to change a columns name
Previous Message Wim Ceulemans 1999-03-10 19:49:46 Is it possible to change a columns name