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: Dropping a column?

Re: Dropping a column?

From: Bryan Warfield <Bryan.Warfield_at_DAL.frb.org>
Date: 1997/06/12
Message-ID: <33A02084.6B7B@DAL.frb.org>#1/1

Cecil D'Souza wrote:
>
> John,
>
> You cannot drop a column in Oracle. You could recreate another table with
> the COPY - AS SELECT combination where you would specify the columns for
> the new table.( it is here you don't specify the name of the column you
> want to drop). Alternately, the data gets copied as well.
>
> Once you have created the new table, confirm it,
> then drop old table,
> then rename new table the old table name.
>
> HTH
> Cecil
>
> John Duska <duska_at_srfs.pitt.edu> wrote in article
> <33982628.73F78D85_at_srfs.pitt.edu>...
> > Is there some way to drop a column from a table? I know this sounds
> > stupid, but I can't find the command anywhere.
> > thanks
> > John
> >

I'd like to add that this is an ISO SQL restriction (i.e., the international SQL standard does not permit database vendors to implement a "drop column" statement in ISO Standard SQL). Of course, vendors could implement "drop column" as an extension. However, the restriction exists in the standard to save you from yourself (dropping a column could adversely affect applications using the table in which the column is dropped).



Bryan Warfield Certified Oracle DBA Federal Reserve Bank of Dallas voice: 214-922-5873 E-mail: Bryan.Warfield_at_DAL.frb.org Received on Thu Jun 12 1997 - 00:00:00 CDT

Original text of this message

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