Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dropping a column?
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).