Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Renaming a column
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
![]() |
![]() |