SELECT
*
FROM
(
SELECT t1.*,@rank:=@rank+1 AS RANK
FROM
(SELECT * FROM act_wishcard ORDER BY donationAmount DESC) t1,(SELECT @rank:=0) t2
) t
ORDER BY t.RANK ASC;
SELECT
*
FROM
(
SELECT t1.*,@rank:=@rank+1 AS RANK
FROM
(SELECT * FROM act_wishcard ORDER BY donationAmount DESC) t1,(SELECT @rank:=0) t2
) t
ORDER BY t.RANK ASC;
本文标题:查询获取排名
本文链接:https://www.haomeiwen.com/subject/uiylrxtx.html
网友评论