MySQL生成排序序号RN

有时因为业务的需求,我们需要在查询出的数据中加上排序序号,例:
在这里插入图片描述

SQLselect a.*, (@i:= @i+1) as rank_no from performance a,(select @i:=

猜你喜欢

转载自blog.csdn.net/ZZQHELLO2018/article/details/129238430