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: Can Oracle drop a column?

Re: Can Oracle drop a column?

From: D.M. Mattix <dmmatt_at_monsanto.com>
Date: 1997/05/26
Message-ID: <5mc29r$ls3@mhstl1.monsanto.com>#1/1

In article <33891768.5A73_at_ping.be>
Johnny Verhoeven <Johnny.Verhoeven_at_ping.be> wrote:

> Yao Fang wrote:

>>
>> Hi there :
>> The table has about 1m of data. I want to drop a column of that table.
>> It seems like Oracle doesn't allow me to do that. When I use ALTER TABLE
>> command. The only thing I can drop is the constraints. Some may suggest to
>> create a temporary table, then use INSERT to transfer the data.(It takes
>> some time) Is there any other ways?
>> TIA
>>
>> Kathy Fangyao
> 
> You connot drop a table, the above suggested is a good way ( temp table)
> 
> Johnny Verhoeven
> Technic and Technology

This is very interesting. The only relational database that I have found in which you can drop a column is Rdb (Oracle Rdb used to be DEC Rdb). If you underestimate the size of a varchar column and need to extend it you can add a new larger column and (using SQL) copy the data to it but you cannot get rid of the old column. With Rdb you can even alter the column in place although it is not recommended without a lot of thought (it will truncate the data that does not fit into the new definition).

D.M. (Mike) Mattix
Monsanto Company
Luling, LA
dmmatt_at_monsanto.com
(My comments do not reflect the position of Monsanto) (I know, like you thought they did..) Received on Mon May 26 1997 - 00:00:00 CDT

Original text of this message

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