更新关联表的值

Update table1  set key1 = (select key2 from table2 where table2.key2=table1.key1) where exists (select key2 from table2 where table2.key2=table1.key1)

  

update table1   a set a.column1=( select column2 from table2  b where a.key1=b.key2)

 

你可能感兴趣的:(更新)