Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Changing column order
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 Tue Mar 23 1999 - 13:07:01 CST