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: Gints Plivna <gints.plivna_at_gmail.com>
Date: 21 Sep 2006 06:13:09 -0700
Message-ID: <1158844389.576943.228070@m73g2000cwd.googlegroups.com>


Mikhail Teterin wrote:
> According to on-line references like
>
> http://www.mckoi.com/database/SQLSyntax.html#3
>
> the command to drop a table's column is:
>
> ALTER TABLE table_name ADD [COLUMN] column_declare
>
> The "COLUMN" keyword is optional.
>
> Unfortunately, Oracle seems to *require* the keyword:
>
> alter table test drop a
> *
> ERROR at line 1:
> ORA-00905: missing keyword
>
> While Sybase *rejects* it:
>
> alter table test drop column a;
> Msg 102, Level 15, State 1
> Server 'NASSAB', Line 1
> Incorrect syntax near 'a'.
>
> What's a portable application to do? Is there a syntax, that's acceptable to
> both servers? Thanks!
>
> -mi

Here are some thoughts of portable applications: http://www.rittman.net/archives/001140.html

In general if you'd like to create "portable applications" then you have to be ready to make a separate layer for each of your DB's unless you haven't all operations absolutely trivial.

Gints Plivna
http://www.gplivna.eu Received on Thu Sep 21 2006 - 08:13:09 CDT

Original text of this message

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