Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: re-ordering rows

Re: re-ordering rows

From: John Higgins <JH33378_at_deere.com>
Date: Fri, 23 Apr 1999 22:19:23 -0500
Message-ID: <3721383B.36083A7@deere.com>


Create table temp_A as select * from A order by x,y,z; Truncate table A;
Insert into table A (select * from temp_A); Drop table temp_A;

Feel free to use external files and external sort and SQL*Loader instead of temp_A table.

Could also:
Rename table A old_A;
Create table A as select * from old_A order by x,y,z; Drop table old_A;
Then re-create indexes, grants, etc.

Gennady wrote:

> Hello,
> I need to re-order rows in my table
> and then save the new row order
> in the same table. How can I do that?
> Please, help.
>
> Gennady.
Received on Fri Apr 23 1999 - 22:19:23 CDT

Original text of this message

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