我希望我的THEN声明能够做类似
的事情MERGE INTO ...
USING (...)
WHEN true
THEN [Update 1] AND [Update 2]
实现此目的的正确语法是什么?
我道歉,我应该更清楚。
感谢您的时间!
答案 0 :(得分:1)
You could use:
CASE
WHEN condition
statement1;
statement2;
ELSE
else_statement;
END CASE;
Please note the difference between case expression/statement.
答案 1 :(得分:0)
Two case
expressions:
(Case When true Then [Statement 1] end),
(case when true then [Statment 2] end)
As with all expressions, a case
expression only returns one value.