Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: changing the Seqence of the Columns in a Table
I believe this is not possible directly. The only was I could think of is to
create new_table as select <columns in new order> from old_table and
then rename old_table to old_table_backup and rename new_table to old_table
(you will also need to create indexes on the new_table anew AFTER you
renamed old and new tables). After you verify that everything is ok, you can
drop the backup of the old table to free the space taken by it and do an
alter tablespace coalesce (just in case). As side effect your table and indexes
will be reorganized.
Actually I don't see why you would want to reorder the columns because you can always select them in any particular order, the only case when they will be returned in order they are specified at table creation is when you select *.
-- Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer. "Sascha Kern" <Teddy_71_at_freenet.de> wrote in message news:a6n4m5$i5c$00$1_at_news.t-online.com...Received on Wed Mar 13 2002 - 04:55:57 CST
> Is ist possible to change te Sequence of columns in a table.
> How can this be done.
> Thanks for helping me
>
>
![]() |
![]() |