Re: add a new column into the middle of an existing table

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Thu, 2 May 2002 15:05:22 +1000
Message-ID: <aaqhge$kug$1_at_lust.ihug.co.nz>


And user permissions/privileges/grants to roles etc etc etc.

If you have to do it, you have to do it. But it's expensive, and if you can avoid doing it, it's better to.

Regards
HJR "Bill Garcia" <garcia.wj_at_verizon.net> wrote in message news:g52A8.28157$iJ.10713_at_nwrddc02.gnilink.net...
> I like having the column where I want it expescially if it exists that way
> in another database instance.
>
> rename old_table to old_table_bak;
>
> copy from user/password_at_sid --
> to user/password_at_sid --
> create old_table --
> using --
> select "column list with new column in order you want" --
> from old_table_bak;
>
> Of course you will lose the indexes and/or constraints on the table. So,
> they will have to be recreated.
>
>
> Bill Garcia
> Tampa Florida
>
> "lei wang" <leiwang_q_at_hotmail.com> wrote in message
> news:af074b9c.0204301247.65da02f9_at_posting.google.com...
> > Is there an easy way to add a new column into the middle of an
> > existing table? Seems to me that you have to create a new table and
> > copies data from the old table. <Alter table add column> statement
> > will only adds columns at the end of an existing table.
> >
> > I am using Oracle 8.1.7 EE on Solaris 2.7.
> >
> > Thanks.
>
>
Received on Thu May 02 2002 - 07:05:22 CEST

Original text of this message