The PUT_LINE stored procedure puts a single line in the buffer.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
DBMS_OUTPUT.PUT_LINE (
item IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| item | The line to buffer. |
Considerations
You can build a line piece by piece by calling
PUTseveral times, or place an entire line in the buffer by callingPUT_LINE.When you call
PUT_LINE, an end-of-line marker is automatically added. If the line is created byPUT, you must add an end-of-line marker by callingNEW_LINE. TheGET_LINEandGET_LINESstored 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
PUTorPUT_LINEis 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_OUTPUTmessages until the PL program completes. PL programs do not have any mechanism for flushing theDBMS_OUTPUTbuffers.obclient> SET SERVEROUTPUT ON; obclient> BEGIN DBMS_OUTPUT.PUT_LINE ('hello'); DBMS_LOCK.SLEEP (10); END;