SQL>
SQL> DECLARE
2 current_block VARCHAR2(10) := 'Outer';
3 outer_block VARCHAR2(10) := 'Outer';
4 BEGIN
5 dbms_output.put_line('[current_block]['||current_block||']');
6 DECLARE
7
8 current_block VARCHAR2(10) := 'Inner';
9 BEGIN
10 dbms_output.put_line('[current_block]['||current_block||']');
11 dbms_output.put_line('[outer_block]['||outer_block||']');
12 END;
13 dbms_output.put_line('[current_block]['||current_block||']');
14 END;
15 /
[current_block][Outer]
[current_block][Inner]
[outer_block][Outer]
[current_block][Outer]
PL/SQL procedure successfully completed.
SQL>
|