17,086
社区成员
发帖
与我相关
我的任务
分享
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';