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 -> Re: Renaming a column

Re: Renaming a column

From: Winnie Liu <poohland_at_hotmail.com>
Date: Sun, 23 Aug 1998 21:50:32 -0700
Message-ID: <6rqr67$fl4@sjx-ixn1.ix.netcom.com>


If you really want to rename a column, how about just create a view with the column name that you want?

Winnie

Danil Krasnov wrote in message <01bdce96$39d1d0f0$3e8480c3_at_danil>...
>Hi!
>
>example:
>Assume, we have table TABLE1 (A1 varchar2, A2 number) and wish to rename
>column A1 to B1.
>So, we do:
>
>create table TABLE2(B1 varchar2, A2 number);
>insert into TABLE2(B1 varchar2, A2 number) select A1, A2 from TABLE1;
>drop table TABLE1;
>rename TABLE2 to TABLE1;
>
>That's all.
>
>May be someone will suggest shorter way? Will be thankful.
>
>Danil Krasnov
>danil_at_maginfo.net
>
>
>Lak Nadella <lak_at_more.net> wrote in article <35DF8E3C.89CCE6B2_at_more.net>...
>> Could someone give me pointers as to how I can rename a column in a
>> table without dropping the table and recreating it?
>> TIA
>> Lak
>>
>>
Received on Sun Aug 23 1998 - 23:50:32 CDT

Original text of this message

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