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

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

From: Ed Prochak <prochak_at_my-dejanews.com>
Date: Wed, 24 Mar 1999 19:15:20 GMT
Message-ID: <7dbdju$kso$1@nnrp1.dejanews.com>


In article <7dal1s$ttn$1_at_nnrp1.dejanews.com>,   tim.mcconechy_at_runtime.dk wrote:
> 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...
>

In a relational database the real question here is WHY?

What reason would lead you to care the order of columns in the table? You may be thinking about the problem the wrong way. It's one of those time you need to think "out of the box".

Ed Prochak
Magic Interface, Ltd.
ORACLE services
440-498-3702

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Mar 24 1999 - 13:15:20 CST

Original text of this message

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