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: Danil Krasnov <danil_at_maginfo.net>
Date: 23 Aug 1998 13:01:00 GMT
Message-ID: <01bdce96$39d1d0f0$3e8480c3@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 - 08:01:00 CDT

Original text of this message

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