How to get the row number or rank of row in mysql? January 1, 2014MySQL Queries, UncategorizedMySQL QueriesWhiteWind It should be done as follows: SELECT @x:= @x + 1 AS rank, title FROM t1 JOIN ( SELECT @x:= 0 )X ORDER BY weight Share this:Click to share on WhatsApp (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Pinterest (Opens in new window)Click to share on Tumblr (Opens in new window)Click to share on Pocket (Opens in new window)Click to share on Reddit (Opens in new window)Click to email a link to a friend (Opens in new window)Click to print (Opens in new window)Like this:Like Loading... Related