17,140
社区成员




update b set clientname = (select sname from a where a.idnum= 1) where remarked = 'hhh';
update b set clientname = (select sname from a where a.idnum= 2) where remarked = 'hhh';
update b set clientname = (select sname from a where a.idnum= 3) where remarked = 'hhh';
1,2,3是什么?b每行的b.idnum。所以
update b set clientname = (select sname from a where a.idnum= b.idnum) where remarked = 'hhh';