SQLite Forum

How to rerank one row in a big set of rows?
Login
Usually you don't store ranks.  Calculate a rank by iterating through an index of scores until you find the row you want.

If you have a situation where it *is* useful to store ranks, and ranks don't change often, don't store ranks in the same table where your scores are stored.  Make a special table for just id, score and rank, and have a procedure which deletes all the rows in the table and makes new ones.  Call this procedure when a new set of scores are in.