--写一个通用的
update a
set a.num = a.num + b.num
from table1 a inner join table2 b on a.id = b.id --(关联条件)
where ... --如果有条件的话


--有查询的
update a
set a.num = a.num + b.num
from table1 a  
  inner join (查询语句) b on a.id = b.id --(关联条件)
where ... --如果有条件的话
 


 

相关文章:

  • 2021-10-15
  • 2021-09-05
  • 2021-08-30
  • 2021-11-30
  • 2021-10-20
  • 2021-10-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2021-10-20
  • 2022-12-23
相关资源
相似解决方案