DBMS OUTPUT

From Oracle FAQ
Jump to: navigation, search

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[edit]

dbms_output.enable[edit]

Enable dbms_output support.

dbms_output.disable[edit]

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

dbms_output.put[edit]

Insert text into the output buffer.

dbms_output.put_line[edit]

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

dbms_output.new_line[edit]

Insert end of line symbol into output buffer.

dbms_output.get_line[edit]

Read one line from the buffer.

dbms_output.get_lines[edit]

Read line array from the buffer.

Examples[edit]

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