Say I have a table
name rank
-----------------------
John 1
Tit 3
Bernard 4
Rank 2 is missing, can be removed or whatever. I need a query to increase the rank field. So John will be number 1, but now Titus will be number 2, and Bernard 3.
There can be up to 100 ranks, and some are missing. So far, the lowest rank is reset to number 1, and everything that follows the step should be good.
Any ideas?
Request to update the rank field.
source
share