select @x:=ifnull(@x,0)+1 as rownum,person_id from t_base_person 转载于:https://www.cnblogs.com/kgdxpr/p/7510715.html