Oracle Database provides the put_line procedure (in the dbms_output package) to print statements. This output is not, however, displayed by default in SQL*Plus; it must be enabled using:
SQL> set echo on
SQL> set serveroutput on
put_line can then be used as follows:
SQL> declare
2 x number;
3 begin
4 x := 3;
5 dbms_output.put_line('x is ' || x);
6 end;
7 /
x is 3
PL/SQL procedure successfully completed.
SQL>
0 Responses to “printing PL/SQL debug output in SQL*Plus”