一条sql就搞定了 update table1 a left join table2 b on a.openid=b.openid set a.openid=b.new_openid where b.new_openid is not null;
一条sql就搞定了