ORACLE 数据库问题 case when 条件 then (update 执行语句 ) els

ORACLE 数据库问题
case when 条件 then (update 执行语句 ) elsORACLE 数据库问题
case when 条件 then (update 执行语句 ) els (update 执行语句 )

这样的语句存在吗?
如果不存在,如何解决!
拜托大神……

 当然存在啊,语句格式如下,dbms_output.put_line('1');可以替换为任何语句。

       

declare
  v_num number;
begin
  v_num := &请输入值;
  case v_num
    when 1 then
      dbms_output.put_line('1');
    when 2 then
      dbms_output.put_line('2');
    when 3 then
      dbms_output.put_line('3');
    else
      dbms_output.put_line('null');
  end case;
end;

温馨提示:答案为网友推荐,仅供参考
相似回答