Update the rank in a MySQL Table

Posted by sammichy on Stack Overflow See other posts from Stack Overflow or by sammichy
Published on 2010-04-28T06:02:23Z Indexed on 2010/04/28 6:03 UTC
Read the original article Hit count: 282

Filed under:
|
|

I have the following table structure for a table Player

Table Player {
Long playerID;
Long points;
Long rank;
}

Assuming that the playerID and the points have valid values, can I update the rank for all the players based on the number of points in a single query? If two people have the same number of points, they should tie for the rank.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about rank