User-defined Order in SQL
Some applications (…) need to maintain a user-defined order of items. The challenge is that the order is arbitrary and can change when the user rearranges items. This article investigates the best way to model the situation in SQL. We’ll examine several ways to do it, and will assess three properties for each: efficiency in space and time, robustness and elegance.
source