mysql结果里set自增列
select (@i:=@i+1) i,a.* from ads_building_street a,(select @i:=0) it;
结果:
set @num =0 ;
SELECT @num:=@num+1 as id,a.name FROM ads_building_street a;
select (@i:=@i+1) i,a.* from ads_building_street a,(select @i:=0) it;
结果:
set @num =0 ;
SELECT @num:=@num+1 as id,a.name FROM ads_building_street a;