You probably need the DBMS_OUTPUT package, i.e.
DECLARE a INTEGER := 0; BEGIN dbms_output.put_line( 'Starting value: ' || a ); a := a + 1; dbms_output.put_line( 'Ending value: ' || a ); END;
Note that you usually need to enable DBMS_OUTPUT in the client application before the data is displayed. In SQL * Plus you need
set serveroutput on;
before executing the stored procedure so that data is displayed after execution. Other GUI tools have different approaches for including DBMS_OUTPUT .
Justin cave
source share