PUT

2023-10-24 09:23:03  Updated

The PUT stored procedure puts a partial line in the buffer.

Syntax

DBMS_OUTPUT.PUT (
item IN VARCHAR2);

Parameters

Parameter Description
item The line to buffer.

Usage notes

  • You can build a line piece by piece by calling PUT several times, or place an entire line in the buffer by calling PUT_LINE.

  • When you call PUT_LINE, an end-of-line marker is automatically added. If the line is created by PUT, you must add an end-of-line marker by calling NEW_LINE. The GET_LINE and GET_LINES stored procedures do not return lines that are not terminated by line breaks.

  • You will receive an error message if your lines exceed the line limit.

  • The output that you create by using PUT or PUT_LINE is buffered. The output cannot be retrieved until the PL program unit from which it was buffered returns to its caller.

    For example, OBClient does not display DBMS_OUTPUT messages until the PL program completes. PL programs do not have any mechanism for flushing the DBMS_OUTPUT buffers.

    obclient> SET SERVEROUTPUT ON;
    obclient> BEGIN
        DBMS_OUTPUT.PUT_LINE ('hello');
        DBMS_LOCK.SLEEP (10);
        END;
    

Contact Us