Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Drop column in 8i?

Re: Drop column in 8i?

From: Fraser McCallum <fmcc_at_NOSPAModbaguru.com>
Date: Tue, 19 Feb 2002 12:25:00 -0000
Message-ID: <Jtrc8.10999$kX6.95113@NewsReader>


Harry,

Sorry spotted at typo, that "drop unused columns checkpoint 500;" should have had an "alter table TABLENAME" in front of it.

BTW: You can just issue a drop and specify the column but I wouldn't recommend this for the same reasons I don't recommend doing a drop unused. Setting the column as unused and then cleaning it up with a reorg at a more convenient time is so much cleaner.

Kind Regards

Fraser McCallum
MVP Oracle Administration
www.brainbench.com

"Fraser McCallum" <fmcc_at_NOSPAModbaguru.com> wrote in message news:ogrc8.4755$S37.30499_at_NewsReader...
> Harry,
>
> There are a couple of ways to go about doing this.
>
> alter table TABLENAME set unused column COLUMNNAME;
>
> This makes the column disappear from a logical point of view though in
fact
> the data is still being stored. Be aware you will need to drop any indexes
> that reference this column and recompile any dependant packages. Now to
get
> rid of it for good you could, but I wouldn't, issue a:
>
> drop unused columns checkpoint 500;
>
> I don't recommend using this as it will generate a swag of redo/rollback
and
> lock the table for the duration. Also if it crashes you have to use:
>
> alter table drop columns continue checkpoint 500;
>
> to continue the drop.
>
> Personally I would leave the table as is at that point until you next
> reorganise as using either an export/import cycle or the alter table
> TABLENAME move; command will not recreate the hidden column. If you must
do
> it online use the move command as it is, in my experience, usually faster
> and cleaner than a drop columns command.
>
> Kind Regards
>
> Fraser McCallum
> MVP Oracle Administration
> www.brainbench.com
>
> "harry" <a_at_abc.com> wrote in message
> news:22c47uoj5465e4o2453p48h3knaaa15imh_at_4ax.com...
> > Is it possible? - if so whats the syntax?
> >
> > thanks
> >
> > harry
>
>
Received on Tue Feb 19 2002 - 06:25:00 CST

Original text of this message

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