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: drop column

Re: drop column

From: <marcpark_at_my-deja.com>
Date: 2000/05/03
Message-ID: <8ep9kj$tit$1@nnrp1.deja.com>#1/1

Also,

I versions prior to 8.1.5 you can copy the table to a temporary table, drop the original table and copy the table back with the column you want to drop excluded.

If you do this you must recreate all indexes and constraints.

Marc Parkinson
In article <8ep0mk$jt3$1_at_nnrp1.deja.com>,   Thomas J. Kyte <tkyte_at_us.oracle.com> wrote:
> In article <390FF6F4.D2B468EE_at_gre.ac.uk>,
> simon cunningham <cs694_at_gre.ac.uk> wrote:
> > hello everyone
> >
> > is it possible to drop a column from a table.....Im sure it is but
 cant
> > remember the syntax????
> >
> >
>
> This feature is new to Oracle8i, release 8.1.5 and up.
>
> See http://technet.oracle.com/doc/server.815/a67779/ch4d.htm#64485
>
> for the syntax (alter table T drop column X). You can either drop
 (and
> rewrite the table) or just flag delete (set unused) a column which
 does
> not rewrite the table.
>
> Prior to that, you would use a view to drop a column:
>
> o rename T to T_tbl, rename the table to something else
> o create view T as select <everything but the column to drop> from
 T_tbl
> o revoke all grants on T_tbl
> o grant them to T (the new view)
>
> --
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries
> http://osi.oracle.com/~tkyte/index.html
> --
> Opinions are mine and do not necessarily reflect those of Oracle Corp
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed May 03 2000 - 00:00:00 CDT

Original text of this message

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