Re: how to drop a column in a table?

From: Myrna J. Evans <mjevans_at_bigfoot.com>
Date: Sun, 4 Jul 1999 23:23:36 -0400
Message-ID: <wzVf3.14505$1d1.1131_at_news3.atl>


Erin,

You don't mention what version of Oracle you have, but I think only the very latest (8.0.5) allows you to drop a column. Older versions of Oracle have no such mechanism.

One way to do it is to create a new table with a CREATE TABLE table_name AS SELECT all columns except the one you don't want FROM old_table, then drop the old table and rename the new table just created. You will also have to re-create any privileges, indexes, triggers, etc., associated with the old table. If the table is very large, this could take considerable resources. Be sure to specify UNRECOVERABLE.

HTH Myrna

Erin A. O'Neill <eon_at_crl.crl.com> wrote in message news:7jmmor$2i2b$1_at_nnrp9.crl.com...
> I would like to drop just a column in a table. What's the syntax for
this?
>
> I've tried
>
> ALTER TABLE my_table
> drop column baddata;
>
> and it doesn't like the drop column (nor drop col)?? any hints??
>
> thanks.
> erin
>
> --
> --- erin -- eon_at_crl.com ---
> ---
> www.madkats.com
> "Computers are useless. They can only give you answers."
> --Pablo Picasso (1881-1973)
>
>
Received on Mon Jul 05 1999 - 05:23:36 CEST

Original text of this message