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: Alter column so column comes in the middle of column list...

Re: Alter column so column comes in the middle of column list...

From: <mpir_at_compuserve.com>
Date: Fri, 26 Mar 1999 20:27:40 GMT
Message-ID: <7dgqjf$ckr$1@nnrp1.dejanews.com>


The basic answer is no. Consider how the data is stored internally in ORACLE. Inserting a column in the middle requires rewriting the entire table. A copy drop or some similar proceedure is needed.

If it is just for comparison of a table layout, why won't a view work?

In article <36f8fb1e.0_at_ruby.hknet.com>,   "小不" <enochw_at_hknet.com> wrote:
> Try to find third party DBA products.
>
> tim.mcconechy_at_runtime.dk 撰寫於文章 <7dal2b$ttq$1_at_nnrp1.dejanews.com>...
> >I don't know how to explain this but I'll try..
> >
> >Say I have a table
> >CREATE TABLE TEST ( col1 number2,col2 varchar2(20));
> >
> >If I add a column using..
> > ALTER TABLE TEST ADD col1_5 number;
> >
> >Then my table looks like:
> >SQL> desc test
> > Name Null? Type
> > ------------------------------- -------- ----
> > COL1 NUMBER
> > COL2 VARCHAR2(20)
> > COL1_5 NUMBER
> >
> >
> >I want it to look like:
> >SQL> desc test
> > Name Null? Type
> > ------------------------------- -------- ----
> > COL1 NUMBER
> > COL1_5 NUMBER
> > COL2 VARCHAR2(20)
> >
> >Is there someway to alter table so I can do this...
> >
> >I know I can drop and recreate but don't want to!!!!
> >
> >thanks for your help...
> >
> >-----------== Posted via Deja News, The Discussion Network ==----------
> >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
>

Joseph R.P. Maloney, CCP,CSP,CDP
MPiR, Inc.
502-451-7404
some witty phrase goes here, I think.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Mar 26 1999 - 14:27:40 CST

Original text of this message

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