MySQL 排名问题


SET @ranking=0;
select * from (select *,@ranking:=@ranking+1 AS `ranking` from computer.computer_user ORDER BY `question_count` DESC) as result where result.id = 6;

posted @ 2017-06-14 01:20  RoperLee  阅读(156)  评论(0)    收藏  举报