Mysql 模拟自增主键

select (@i:=@i+1) No,t.* from tableName t,(select @i:=0) init

原文地址:https://www.cnblogs.com/steven158/p/15719308.html