+-------------+-------+
--3.rank式的排序
SET @row=0,@rank=0,@prev_score=NULL;
SELECT @row:=@row+1 AS ROW,
@rank:=IF(@prev_score=score,@rank,@row) AS rank,
@prev_score:=score AS score
FROM tb
ORDER BY score DESC;
+------+------+-------+
(北联网教程,专业提供视频软件下载)
……