Thread: Is it possible to change a columns name

Is it possible to change a columns name

From
"Wim Ceulemans"
Date:
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?

TIA
Wim Ceulemans - wim.ceulemans@nice.be
Nice Software Solutions www.nice.be
Eglegemweg 3, 2811 Hombeek - Belgium
Tel +32(0)15 41 29 53 - Fax +32(0)15 41 29 54




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

From
Bruce Momjian
Date:
[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@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026