The PUT_LINE procedure is used to put a single line of data into a buffer.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.
Syntax
DBMS_OUTPUT.PUT_LINE (
item IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| item | The line to be buffered. |
Considerations
You can build an information line in segments by calling
PUTmultiple times, or you can callPUT_LINEto put the entire line of information into the buffer.A line terminator is automatically added after a call to
PUT_LINE. If you create a line by callingPUT, you must callNEW_LINEto add a line terminator.GET_LINEandGET_LINESdo not return lines that are not terminated by a newline character.An error message is returned if the number of lines exceeds the limit.
Output created by using
PUTorPUT_LINEis buffered. You cannot retrieve the output until the PL program unit that generates the buffered output returns to its caller.For example, OBClient does not display
DBMS_OUTPUTmessages until the PL program completes. There is no mechanism in the PL program to refresh theDBMS_OUTPUTbuffer.obclient> SET SERVEROUTPUT ON; obclient> BEGIN DBMS_OUTPUT.PUT_LINE ('hello'); DBMS_LOCK.SLEEP (10); END;