MySQL 行号(类似SQLServer的row_number()) Select ID,(@rowNum:=@rowNum+1) as RowNo From a,(Select (@rowNum :=0) ) b