Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: re-ordering rows
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
![]() |
![]() |