SELECT (@i:=@i+1) AS rownum , v.id,v.UserName
FROM
userinfo v,
(SELECT @i := 0) AS i
SELECT (@i:=@i+1) AS rownum , v.id,v.UserName
FROM
userinfo v,
(SELECT @i := 0) AS i
本文来自博客园,作者:.net&new,转载请注明原文链接:https://www.cnblogs.com/wugh8726254/p/16794446.html