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: Changing column order

Re: Changing column order

From: Dr. Jan Dieckmann <JDieckmann_at_psi.de>
Date: Wed, 24 Mar 1999 15:46:49 +0100
Message-ID: <36F8FAD9.CDF4B3A4@psi.de>


I agree it is bad practise . But if you like to do it you should use a tool which generates the complete sql script (rename table, create new table, indexes, trigger ...). The tool Hora 3 offers on the tab register "columns" of the "table page" a command "rename column". Use this command to generate a sql script and edit the script. See http//www.keeptool.com for a free trial version of Hora 3.

regards Jan Dieckmann
KeepTool

Arjan van Bentem wrote:

> Thor Morten Kopaas wrote
>
> > After a table has been created, is there a way to change the
> >order in which the columns are displayed
>
> I feel it is bad practise to rely on the database column order, but that is
> just a matter of taste. In spite of all efforts you will find one day that
> your production and test database do not have the same column order, as for
> the production database columns are most like ADDED, while for the test
> database the whole database might have been re-created, with a different order
> of the columns in the create table scripts...
>
> You could create a copy of your table, using
>
> create table my_temp_table as
> ( select empno, name, salary
> from employee
> );
>
> drop table employee;
>
> alter table my_temp_table rename to employee;
>
> This is, of course, only a solution if your database constraints allow it.
>
> Arjan.
Received on Wed Mar 24 1999 - 08:46:49 CST

Original text of this message

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