Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Renaming Columns -- How?

Renaming Columns -- How?

From: Tay Ninh Brown <tay_at_NO.JUNK>
Date: 1998/03/18
Message-ID: <01bd52a2$29432dd0$8187d9cf@rana>#1/1

Is there a way to rename table columns?

I've done the following to rename a column while preserving all the old table data:

   create table temp_tablename as
   select * from tablename
/

   drop table tablename
/

   create tablename ( <newcolumns-with-new-names> )
/

   create indexes, permissions, etc.
/

   insert into tablename ( <newcolumns-list> )    select <oldcolumns-list>
   from temp_tablename
/

The very first statement fails for one of our tables because one of the columns is of LONG datatype.

Is there a simple, single command for renaming a column?

Thanks in advance.

(Apologies for anti-spam addressing: see Org line for domain info.) Received on Wed Mar 18 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US