SELECT `Name`,(@rowNum:=@rowNum+1) AS rowNo FROM bas_student,(SELECT (@rowNum :=0)) a LIMIT 10; 转载于:https://www.cnblogs.com/xbblogs/p/5633935.html