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.

Contents

[edit] Functions

[edit] dbms_output.enable

Enable dbms_output support.

[edit] dbms_output.disable

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

[edit] dbms_output.put

Insert text into the output buffer.

[edit] dbms_output.put_line

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

[edit] dbms_output.new_line

Insert end of line symbol into output buffer.

[edit] dbms_output.get_line

Read one line from the buffer.

[edit] dbms_output.get_lines

Read line array from the buffer.

[edit] Examples

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