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: Deleting a column from table

Re: Deleting a column from table

From: Winnie Liu <oracle_dba_at_zdnetmail.com>
Date: Sat, 7 Nov 1998 20:52:32 -0800
Message-ID: <7237ot$87@dfw-ixnews4.ix.netcom.com>


wow.. thanks god.. finally..

I am really looking forward to 8.1.X now! =>

Winnie

Thomas Kyte wrote in message <3643a625.27365850_at_192.86.155.100>...
>A copy of this was sent to "Phil Cook" <pncook_at_worldnet.att.net>
>(if that email address didn't require changing)
>On 7 Nov 1998 01:43:15 GMT, you wrote:
>
>>Age-old question, no good answer yet.
>>
>>Two options; create a view with just the columns you want or
>>drop the table and re-create. A number of ways to do this,
>>one way is to export the table, create an ascii file using
>>imp indexfile=xxx and then modify the xxx script. Just
>>be careful if any foreign keys are pointing to the table.
>>
>>Maybe Oracle 9 or 10 will fix this....
>>
>>Phil Cook
>
>
>8i :)
>
>
>SQL*Plus: Release 8.1.3.0.0 - Beta on Fri Nov 6 20:43:25 1998
>(c) Copyright 1998 Oracle Corporation. All rights reserved.
>Connected to:
>Oracle8 Enterprise Edition Release 8.1.3.0.0 - Beta
>With the Partitioning and Objects options
>PL/SQL Release 8.1.3.0.0 - Beta
>
>SQL> 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)
>
>SQL> alter table emp drop column job;
>
>Table altered.
>
>SQL> desc emp
> Name Null? Type
> ------------------------------- -------- ----
> EMPNO NOT NULL NUMBER(4)
> ENAME VARCHAR2(10)
> MGR NUMBER(4)
> HIREDATE DATE
> SAL NUMBER(7,2)
> COMM NUMBER(7,2)
> DEPTNO NUMBER(2)
>
>
>
>Thomas Kyte
>tkyte_at_us.oracle.com
>Oracle Government
>Herndon VA
>
>--
>http://govt.us.oracle.com/ -- downloadable utilities
>
>---------------------------------------------------------------------------
-
>Opinions are mine and do not necessarily reflect those of Oracle
Corporation
>
>Anti-Anti Spam Msg: if you want an answer emailed to you,
>you have to make it easy to get email to you. Any bounced
>email will be treated the same way i treat SPAM-- I delete it.
Received on Sat Nov 07 1998 - 22:52:32 CST

Original text of this message

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