in reply to Re^2: reordering a stack with little effort
in thread reordering a stack with little effort

In Oracle you can use CONNECT BY to do this:

SELECT id FROM thetable START WITH id = 1 CONNECT BY PRIOR next = id