Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Alter column so column comes in the middle of column list...
Thanks for the reply but not exactly what I want...
I need the change to the table to be permenant and not use a view....
Remember if I do a:
ALTER TABLE TEST ADD col1_5 number;
then the column gets added to the end of the column list...
I was wondering if iot was possible to place it anywhere ... Say as the first column or sceond column instead of the last????
Without droping it!
I don't think it can be done?????
In article <36f8e84c.0_at_news.telekom.ru>,
"Vadim Lejnin" <lejnin_at_fors.ru> wrote:
>
> Vadim Lejnin <lejnin_at_fors.ru> wrote in message
> news:36f8df87.0_at_news.telekom.ru...
> >
> >
> > <tim.mcconechy_at_runtime.dk> wrote in message
> > news:7dal1s$ttn$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)
> > create view test1 as select col1,col1_5,col2 from test;
> >
> > desc test1
> > Name Null? Type
> > ------------------------------- -------- ----
> > COL1 NUMBER
> > COL1_5 NUMBER
> > COL2
> >
> > > 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...
> >
> >
> > --
> >
>
> p.s. I can use also 3 step:
>
> SQL> rename test to test_table
> SQL> create view test as select ....
> SQL> desc test
>
> Best regards, Vadim Lejnin
> Oracle and Unix Administrator company FORS
> Technical Support Department
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Mar 25 1999 - 07:06:18 CST
![]() |
![]() |