示例

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); 

 

相关文章:

  • 2021-08-13
  • 2021-10-19
  • 2021-07-25
  • 2021-12-30
  • 2022-12-23
  • 2021-10-29
  • 2021-10-03
  • 2022-03-04
猜你喜欢
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案