0

我想从另一个表中更新 5 列。如果条件一为真且条件二为真,则列的 2 将从条件更新,其他 3 也将更新。有没有办法在一个声明中做到这一点?

update tableNew
set 
column1 = t1.column1
column2 = t1.column2

column3 = t1.column3
column4 = t1.column4
column5 = t1.column5
where t1.column10 in ('value1','value2') 

from tableOld t1
where t1.column8 is null

我希望你能从这个例子中理解我需要什么,如果不是,我可以尝试提供更多!

4

0 回答 0