Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can Oracle drop a column?
On 25 May 1997 05:03:50 GMT, "Yao Fang" <fangyao_at_worldnet.att.net> 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
Nope. Dropping a column is not standard SQL, for some good reasons I won't go into.
Try CREATE TEMPTABLE AS SELECT <THE COLUMNS YOU WANT> FROM OLDTABLE,
then DROP OLDTABLE
then RENAME TEMPTABLE TO OLDTABLE.
Ciao
Fuzzy
:-)
Received on Mon May 26 1997 - 00:00:00 CDT