merge into table a
using
() b on a=b
when matched then
update set k=1 where;
update set m=2 where
when not matched then
如何可以让 when matched then 中使用多个update 语句
...全文
16447打赏收藏
merge into 如何应用多个update
merge into table a using () b on a=b when matched then update set k=1 where; update set m=2 where when not matched then 如何可以让 when matched then 中使用多个update 语句
merge into table a
using
() b on a=b
when matched then
update set k=(case when a=1 and b=2 then 1 else k end),
m=(case when a=2 and b=1 then 2 else m end) where...;
when not matched then