update中使用select 语法

在msserver 中

 

update  table1 set table1.column1= table2.column2
from
(
  select table2.column1,table2.column2 from  table2

) B
where table1 .column2=B.column2

 

在oracle中

update table1 set (table1.column1,table2.column)

=(select table2.column1,table2.column2 from table2 where table1.column3=table2.column3)

你可能感兴趣的:(update中使用select 语法)