| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Novice to Oracle
"Jordan" <mj_at_nba.com> wrote in message news:<9kjle4$8bi1_at_imsp212.netvigator.com>...
> Hi, I want to know how to rename the column name in a table, thanks..
Hi Jordan,
you can't rename a column.
However, you could add a column, update this column with the old
values and drop the old column.
i.e
alter table xxx add (newcol columntype);
update table xxx set newcol=oldcol;
commit;
alter table xxx drop (oldcol);
for more information read the docu (Oracle 8i SQL Reference)
I', mot sure if this applies to older oracle-version than 8i too..
Hth
Thomas
Received on Mon Aug 06 2001 - 04:55:30 CDT
![]() |
![]() |