select (@i:=@i+1) as i,table_name.* from table_name,(select @i:=0) as it 转载于:https://www.cnblogs.com/MQNH/p/6113671.html