mysql加入行号

为mysql查询加入一列行号自增列

SelectUID,(@rowNum:=@rowNum+1) as rowNo
From a,
(Select (@rowNum :=0) )b
Order by a.Money Desc


你可能感兴趣的:(mysql)