switch plsql

Solutions on MaxInterview for switch plsql by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "switch plsql"
Niklas
07 Jan 2021
1/*in plsql you can do the switch construct by using the case construct that
2you usually use in queries but with the difference that you should specify 
3"END CASE" at the end*/
4CASE some_variable
5	when 'value_1' then
6        --some code
7    	dbms_output.put_line('lalala');
8	when 'value_2' then
9        --some code
10    	dbms_output.put_line('dadada');
11    else
12        --some code
13    	dbms_output.put_line('dududu');
14END CASE;
15