SQL>
SQL> CREATE OR REPLACE PACKAGE global_def IS
2 pv_execution_num PLS_INTEGER := 0;
3 PROCEDURE increment_value (p_increment_num PLS_INTEGER);
4 END global_def;
5 /
Package created.
SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE('Variable Value: ' || global_def.pv_execution_num);
3 global_def.pv_execution_num := global_def.pv_execution_num + 1;
4 DBMS_OUTPUT.PUT_LINE('Variable Value: ' || global_def.pv_execution_num);
5 global_def.pv_execution_num := global_def.pv_execution_num + 1;
6 DBMS_OUTPUT.PUT_LINE('Variable Value: ' || global_def.pv_execution_num);
7 global_def.pv_execution_num := global_def.pv_execution_num + 1;
8 DBMS_OUTPUT.PUT_LINE('Variable Value: ' || global_def.pv_execution_num);
9 END;
10 /
Variable Value: 3
Variable Value: 4
Variable Value: 5
Variable Value: 6
PL/SQL procedure successfully completed.
|