Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: CAN I RENAME A COLUMN IN TABLE

Re: CAN I RENAME A COLUMN IN TABLE

From: TurkBear <johng_at_mm.com>
Date: Wed, 20 May 1998 14:27:08 GMT
Message-ID: <3563e722.2418607@news2.mm.com>

>Dominick LoGiudice wrote:

>>
>> I have a table called DOMSPLIT
>> I have a column on it called LEVEL, It was brought over from an ACCESS
>> system. I realize
>> now it is a reserved word in Oracle, I would like to rename the column
>> to SPLIT_LEVEL.
>> It will stay the same dataype .
>> How can I do this.
>> thanks

Create a temporary table ( temp_domsplit) with a create table temp_domsplit as select ( list the fields and when its is time to list LEVEL, enclose it in quotes and give it an alias i.e. select a,b,"LEVEL" split_level,d,e,... ) ... Drop the original table and rename temp_domsplit to domsplit...

Any constraints, indices, etc will have to be redone...

Note: if SqlPlus will handle LEVEL as a field name in the select statement, then the quotes are not needed...

Hope it helps, Received on Wed May 20 1998 - 09:27:08 CDT

Original text of this message

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