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

Portable way to DROP a COLUMN?..

From: Mikhail Teterin <usenet+meow_at_aldan.algebra.com>
Date: Thu, 21 Sep 2006 08:51:07 -0400
Message-Id: <5292437.JYf4m85ZoG@aldan.algebra.com>


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 DROP [COLUMN] column_name

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 Received on Thu Sep 21 2006 - 07:51:07 CDT

Original text of this message

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