Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Renaming a field
Try :
1) first create a view with the new name for all fields you want, for all
others put the old name.
( lets say :
create view temp_view ("new_col_name1", "old_col2", ...)
as select * from your_table;
)
2) create a temporary table with
create table temp_table as select * from temp_view ; 3) now yuo can drop the view and the originaly table
drop view temp_view;
drop view your_table;
4)a) recreate the table ( if you are with ORACLE below 8.0 )
create table your_table as select * from temp_table;
b) or rename the table ( if you are with ORACLE 8.0 and above ).
alter table temp_table rename to your_table;
Regards
Iosif
DBA - MEI Mtl.
James Wj Snyder <snyderj_at_wellsfargo.com> wrote in article
<01bce65c$d4205640$5a4e9797_at_snyderj.wellsfargo.com>...
> Hello Peoples,
>
> anyone know of a way to rename an oracle field. With ANY tool?
> --
> Peace,
> James Wj Snyder
> Shattered Rose Studio
> ** ClubWin Member **
> www.shatteredrose.com
>
Received on Sat Nov 01 1997 - 00:00:00 CST