SET @mycnt=0; SELECT @mycnt := @mycnt +1 as mycnt, a.*, b.* FROM a, b; 表中第一列即为mycnt,从1开始计数. set @num=0;select concat('update apl_maps_biz set gkid=\'',gkid,'\' where id=',@num := @num +1,';' ) from ca_map_buzman; 1.cp path/mysql/data/your database pa…