With the simple CASE statement, you can add many more WHEN blocks : With « Select Query « Oracle PL / SQL






With the simple CASE statement, you can add many more WHEN blocks

  

SQL>
SQL> BEGIN
  2    CASE
  3      WHEN 1 = 2 THEN
  4        dbms_output.put_line('Case [1 = 2]');
  5      WHEN 2 = 2 THEN
  6        dbms_output.put_line('Case [2 = 2]');
  7      ELSE
  8        dbms_output.put_line('No match');
  9    END CASE;
 10  END;
 11  /
Case [2 = 2]

PL/SQL procedure successfully completed.

   
    
  








Related examples in the same category

1.With statement and subquery