DBMS OUTPUT

From Oracle FAQ
⧼orafaq-jumptonavigation⧽⧼orafaq-jumptosearch⧽

DBMS_OUTPUT is a PL/SQL package that can be used to print or write output from a PL/SQL program to a buffer (or the screen).

Note that the output buffer is not released until the PL/SQL block completes. So, you can only see the output after execution - and not as the program executes.

Functions

dbms_output.enable

Enable dbms_output support.

dbms_output.disable

Deactivate dbms_output support - put, put_line, new_line commands have no effect.

dbms_output.put

Insert text into the output buffer.

dbms_output.put_line

Insert a line (text with end of line symbol) into the output buffer.

dbms_output.new_line

Insert end of line symbol into output buffer.

dbms_output.get_line

Read one line from the buffer.

dbms_output.get_lines

Read line array from the buffer.

Examples

SET SERVEROUTPUT ON
BEGIN
   dbms_output.put_line('Output from PL/SQL...');
END;
/