时间:2021-07-01 10:21:17 帮助过:124人阅读
select id,maxScore,(@rowNum:=@rowNum+1) as rowNo from t_user, (select (@rowNum :=0) ) b order by t_user.maxScore desc
select u.rowNo from ( select id,(@rowNum:=@rowNum+1) as rowNo from t_user, (select (@rowNum :=0) ) b order by t_user.maxScore desc ) u where u.id="2015091810371700001";