Counter package
SQL> SQL> SQL> SQL> create or replace package counter is 2 procedure reset; 3 procedure inc; 4 procedure show; 5 end; 6 / Package created. SQL> create or replace package body counter is 2 cnt pls_integer := 0; 3 procedure reset is 4 begin 5 cnt := 0; 6 end; 7 8 procedure inc is 9 begin 10 cnt := cnt + 1; 11 end; 12 13 procedure show is 14 begin 15 dbms_output.put_line('Execution Count: '||cnt); 16 end; 17 end; 18 / Package body created. SQL> SQL>