Hi all,
I have a table that contains tasks and I want to give these an explicit ordering based on the priority of the task. The only way I can think to do this is via an unique int column that indexes where the task is in term of the priority (i.e. 1 is top 1000 is low).
The problem is that say I wanted to update task and set its priority to a lower value , I would have to update all the other rows between its current value and its new value.
Can anyone suggest a better way of implementing this?