SELECT *,(@i :=@i + 1) AS num FROM ‘你的表名’,(SELECT @i := 0) AS it ORDER BY num
mysql查询加编号
最新推荐文章于 2022-11-01 18:59:32 发布
SELECT *,(@i :=@i + 1) AS num FROM ‘你的表名’,(SELECT @i := 0) AS it ORDER BY num