1、
update table_name_a a
set a.value =
(select b.value from table_name_b b where a.id = b.id)
where exist(select 1 from
table_name_b b where a.id = b.id
)
2、
-- update 超过2个值
update table_name_a a -- 使用别名
set (column_a,column_b)=(select b.field1,b.field2
from table_name_b b
where b.id=a.id)
where a.id = (select b.id from table_name_b b where b.id=a.id
)