How to calculate Rank

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bhutan123
    New Member
    • Jun 2014
    • 6

    How to calculate Rank

    hi..
    can u help me to find rank based on total percentage in Mysql database..
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    The function RANK is not a part of MySQL.

    A possible solution is to add a counter to your SQL statement like this:

    Code:
    set @a:=0; select @a:=@a+1 as rank, t.* from test t;

    Comment

    Working...