select (@i:=@i+1) as rownum,t1.id ","from mega_user t1,(select @i:=0) t2 order by t1.gold desc
查询结果带上序号rownum
select (@i:=@i+1) as rownum,t1.id ","from mega_user t1,(select @i:=0) t2 order by t1.gold desc
查询结果带上序号rownum
转载于:https://www.cnblogs.com/suruozhong/p/6626040.html