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