Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dropping a Column
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
![]() |
![]() |