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