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);
xinxin1994 2017-03-07 19:42 原文
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);