sql连表更新

示例

sqlserver:

update a set a.name=b.name,a.value=b.value from table1 a,table2 b where b.id='id2' and a.id=b.id

 Oracle:

update table1 a set name=(select name from table2 b where a.no=b.no) where 
exists(select name from table2 b where a.no=b.no); 
不忘初心
原文地址:https://www.cnblogs.com/hongjiang/p/9761292.html