update test1 a set a.name=(select b.name from test2 b where a.id=b.id) where a.id in (select id from test2);
update test1 a set a.name=(select b.name from test2 b where a.id=b.id) where a.id in (select id from test2);
转载于:https://www.cnblogs.com/xinxin1994/p/6516445.html