Re: How to rename columns'name in a table?

From: Karl-Heinz Schubert <kschuber_at_de.oracle.com>
Date: Thu, 20 Aug 1998 16:52:57 +0200
Message-ID: <35DC3848.6D01A9B3_at_de.oracle.com>


Hi,
you cann't do that. There is no command for renaming a column. You have to recreate the table with the new name.

There are two ways: 1. create table <new_table> as select <new_column_name> ,.... from old_table.

                                2. create a view on the base_table and
rename the column in the select list.

sirirut vanichayobon schrieb:

> Hi,
>
> Somebody, please, tells me which (SQL) command I can use to rename
> columns'name in a table.
> I know that I can use 'alter table <old_name> rename to <new_name>'
> to rename a table' s name. I have no idea for a column's name.
>
> Thanks in advance,
> -sirirut-

--
_____________________________________________________________________________

Karl-Heinz Schubert   Tel.  : +49 89  75981-245
Senior Consultant   Fax   : +49 89  75981-150
Notkestraße 15
22607 Hamburg          e-mail: kschuber_at_de.oracle.com
_____________________________________________________________________________

Opinions are mine and do not necessarily reflect those of Oracle
Corporation
Received on Thu Aug 20 1998 - 16:52:57 CEST

Original text of this message