select name, score,
@rank := @rank + 1 as rank
from your_table
cross join (select @rank := 0) r
order by score desc
select name, score,
@rank := @rank + 1 as rank
from your_table
cross join (select @rank := 0) r
order by score desc