Not the answer you need?
Register and ask your own question!

update field with ranking

carpiicarpii ContributorInactive User Role Advisor
Hi, is there an efficient way to update a table with the rank of that row, given a specific order by

lets say i have

Table: users
userid int
score int
rank int

select * from users order by score DESC

I want to update the rank field, to the corresponding row number in the above query



Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.