How to add rank based on points in mysql -
I can use some help with this query.
Here is my table:
ID name point 1 Yogi 5 2 cm 10 3 white 5 4 black 8
my query The result is:
Select point DESC
The result is:
id's name point 2 sasi 10 4 black 8 1 Yogi 5 3 white 5
But I would like the result as below please guide me.
id's name point rank 2 sasi 10 1 4 black 8 2 1 yogi 5 3 3 white 5 4
is it possible
SET @rank = 0; Select , such as the order DESC
as a line query, @ rank: = @ rank + 1 rank , @ Rank: Rank from + 1R rank, (SELECT @Rank: = 0) point DESC
Comments
Post a Comment