SQL> create or replace procedure proc2
2 (p1 in number)
3 is
4
5 v_switch char(1);
6
7 BEGIN
8
9 v_switch :=
10 CASE
11 WHEN p1 = 1 THEN 'A'
12 WHEN p1 = 2 THEN 'B'
13 WHEN p1 = 3 THEN 'C'
14 END;
15
16 dbms_output.put_line(v_switch);
17
18 END;
19 /
Procedure created.
SQL> show errors
No errors.
SQL> exec proc2(1)
PL/SQL procedure successfully completed.
SQL>
SQL>
|