简单的批量更新(小技巧)

SQLServer

UPDATE Table2
SET
a2 = Table1.a1,
b2 = Table1.b1
FROM Table1
WHERE Table2.id1=Table1.id1

 

Oracle

  update a set (code)
=
(select code from b where b.node_name=a.node_name)

原文地址:https://www.cnblogs.com/cuihongyu3503319/p/1271184.html