Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Renaming Fields in an Oracle Table
A copy of this was sent to Sybrand Bakker <postbus_at_sybrandb.demon.nl>
(if that email address didn't require changing)
On Thu, 28 Jan 1999 13:55:30 +0100, you wrote:
>Rumours have it this will change with Oracle 8i
>
8i you can rename
datafiles
log files
global database name
indexes
tables
partitions
sub partitions (new object in 8i)
outlines (new object in 8i)
to "rename" a column, you still use a view.
>Regards,
>
>Sybrand Bakker, Oracle DBA
>
>Kai Horstmann wrote:
>
>> kwelty_at_my-dejanews.com schrieb:
>> >
>> > Can someone give me some insight into the process that is required to > change
>> > a field name in an Oracle Table?
>>
>> Hi
>>
>> there is no direct possibility to change the name of the column.
>> You have to rename the table and create a new one with the old name
>> with create table xxx (col1,col2,col3) as select col1,oldcol,col3 from
>> renamed_table;
>>
>> Drop renamed_table.
>> create indexes and constraints like the ones on your old table.
>>
>> Hope that helps
>> Kai
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Jan 28 1999 - 07:50:55 CST