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: Dropping a Column

Re: Dropping a Column

From: Tobias Hitzfeld <Hitzfeld_at_Schoepflin.de>
Date: 1997/08/21
Message-ID: <33FBF95D.D1BD15CF@Schoepflin.de>#1/1

Sorry Peter, this wan't work!

You'll have to create a new table (without the wrong column) and transfer the data from the old table to the new one. Drop the old table afterwards and rename the new one to the old ones name. -- alter the default storage parameters of the tablespace where the old table resists
-- and the default tablespace of the user, which wants to reorganize the table
create table x as select col1,col2,col3,... from old_table; -- remember, the storage parameters are taken from default storage

Another way is to leave the wrong column where it is and to minimize the storage it'll need: update the table and set all values of the wrong tables to null, change the size if the field has a type like char. alter table old_table (wrong_column char(1))

Yours
Tobias.

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:

Giorgio, Peter wrote:

> I need to drop a column from an Oracle table....how?
Received on Thu Aug 21 1997 - 00:00:00 CDT

Original text of this message

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