Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: drop column doesn't work in oracle 9i

Re: drop column doesn't work in oracle 9i

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 21 Dec 2001 17:47:01 -0800
Message-ID: <a00oml015ad@drn.newsguy.com>


In article <PNPU7.1931$aS.269016_at_news010.worldonline.dk>, "Kim says...
>
>Hi
>I can't get drop column work. I have read that this functionality wasn't
>implemented until 8.15, but I am using 9i, so I don't understand that it
>doesn't work. I can use add column without problems.
>
>Regards Kim Eichen
>eichen_at_worldonline.dk
>
>

it works

ops$tkyte_at_ORA9I.WORLD> desc emp

 Name                                Null?    Type
 ----------------------------------- -------- ------------------------
 EMPNO                               NOT NULL NUMBER(4)
 ENAME                                        VARCHAR2(10)
 JOB                                          VARCHAR2(9)
 MGR                                          NUMBER(4)
 HIREDATE                                     DATE
 SAL                                          NUMBER(7,2)
 COMM                                         NUMBER(7,2)
 DEPTNO                                       NUMBER(2)

ops$tkyte_at_ORA9I.WORLD> alter table emp drop column ename;

Table altered.

ops$tkyte_at_ORA9I.WORLD> desc emp;

 Name                                Null?    Type
 ----------------------------------- -------- ------------------------
 EMPNO                               NOT NULL NUMBER(4)
 JOB                                          VARCHAR2(9)
 MGR                                          NUMBER(4)
 HIREDATE                                     DATE
 SAL                                          NUMBER(7,2)
 COMM                                         NUMBER(7,2)
 DEPTNO                                       NUMBER(2)

ops$tkyte_at_ORA9I.WORLD> select * from v$version;

BANNER



Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production PL/SQL Release 9.0.1.0.0 - Production
CORE 9.0.1.0.0 Production
TNS for Solaris: Version 9.0.1.0.0 - Production NLSRTL Version 9.0.1.0.0 - Production

ops$tkyte_at_ORA9I.WORLD> show parameter compate ops$tkyte_at_ORA9I.WORLD> show parameter compat

NAME                                 TYPE
------------------------------------ -----------
VALUE
compatible                           string
9.0.1

make sure your COMPATIBLE init.ora parameter is set properly -- not to a pre-8i release. You don't mention the error so its very very hard to guess whats the cause.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Fri Dec 21 2001 - 19:47:01 CST

Original text of this message

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