mysql查询结果带上序号

select (@i:=@i+1)  as  rownum,t1.id ","from mega_user t1,(select   @i:=0) t2 order by t1.gold desc

查询结果带上序号rownum

posted @ 2017-03-27 11:55  suruozhong  阅读(5083)  评论(0编辑  收藏  举报