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: Portable way to DROP a COLUMN?..

Re: Portable way to DROP a COLUMN?..

From: Jim Kennedy <jim>
Date: Thu, 21 Sep 2006 22:24:30 -0700
Message-ID: <T-mdnY5rpbpZ747YnZ2dnUVZ_tudnZ2d@comcast.com>

"Mikhail Teterin" <usenet+meow_at_aldan.algebra.com> wrote in message news:16844411.TcLQ9b950t_at_aldan.algebra.com...
> "Jim Kennedy" <jim dot scuba dot kennedy at gee male dot com> wrote:
>
> > Dropping a column isn't trivial and should only be done when absolutely
> > necessary.
>
> Whether the task is trivial is besides the point.
>
> What certainly is (or ought to be) trivial is the syntax for the
operation.
>
> > Think about what occurs when you drop a column. [...]
>
> DB-vendors collect thousands of dollars just so that I don't have to
"think
> about what occurs" in the DB back-end, and can concentrate on my
> application. This was is the promise of the standalone database servers...
>

That's your problem; refusal to understand the underlying technology and how the particular vendor implimented the feature. The details are important, because if you don't understand how the vendor implimented it then you open yourself to major unplesant surprises. Blaming the vendor for your lack of understanding - or refusal to appreciate how the technology works is playing the victium.

If you read the docs for Oracle there is a signifigant difference on how you "drop" a column. It is really a two part operation. I am sure DB2 and Sybase, Informix are subtly different. You can drop a column in a standard way. Rename the table, copy it back without the column. drop the renamed table and rebuild indexes on new table. Should work in just about any rdbms.
Jim

> Dropping a column is a legitimate operation (required, for example, when
the
> data-model changes during application's upgrade), and there is no excuse
> for there not being a standardized SQL way of doing it. Having such
> standardized vendor-agnostic way for all (most?) operations is another big
> promise...
>
> Breaking these promises (however commonplace) is simply indefensible --
stop
> trying...
>
> -mi
Received on Fri Sep 22 2006 - 00:24:30 CDT

Original text of this message

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