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: Help !: How can I drop a column in a table?

Re: Help !: How can I drop a column in a table?

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Tue, 23 Jul 2002 18:29:39 +1000
Message-ID: <Nm8%8.41807$Hj3.125924@newsfeeds.bigpond.com>


Hi again Dani :)

Sorry, I misread your post the first time, you have actually used the correct syntax.

Therefore *IF* your on 8i or above, the error message would be really useful. Could be insufficient rollback space, insufficient privileges, constraint violation, etc. etc.

Cheers

Richard

"Richard Foote" <richard.foote_at_bigpond.com> wrote in message news:Qd8%8.41801$Hj3.125907_at_newsfeeds.bigpond.com...
> Hi Dani,
>
> You can only drop a column on 8i or above.
>
> Assuming you're on 8i or above you can either:
>
> ALTER TABLE bowie SET UNUSED COLUMN ziggy
>
> to drop the column "immediately". The data is still physically in the data
> blocks but the DD has been updated to effectively remove the column.
>
> or
>
> ALTER TABLE bowie DROP COLUMN ziggy
>
> to drop the column "slowly". The data will be removed as part of the
> dropping process. This will also remove the data from any previously set
> unused columns.
>
> ALTER TABLE bowie DROP UNUSED COLUMNS
>
> will remove the data from the previously set used columns.
>
> There are various other options you can use, particularly if the table
> you're manipulating is large and much rollback is going to be generated.
>
> All of this is in the SQL reference manual by the way (hint hint).
>
> Good Luck
>
> Richard
>
>
> "dani" <drezusta_at_airtel.net> wrote in message
> news:ahj2k7$9ad$1_at_nsnmrro2-gest.nuria.telefonica-data.net...
> > Hi,
> > I got a problem, I don't know what it's the correct syntax to eliminate
a
> > column in a table.
> > I've tried with : "ALTER TABLE t DROP COLUMN c", but doesn't work
> >
> > Any idea ?
> >
> > thanks
> >
> >
> > Dani
> >
> >
>
>
Received on Tue Jul 23 2002 - 03:29:39 CDT

Original text of this message

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