The PUT procedure is used to buffer part of a row of data.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.
Syntax
DBMS_OUTPUT.PUT (
item IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| item | The row to be buffered. |
Considerations
You can call the
PUTprocedure multiple times to build an information row in segments, or you can call thePUT_LINEprocedure to buffer an entire row of information.A line terminator is automatically added when you call the
PUT_LINEprocedure. If you create a row by calling thePUTprocedure, you must call theNEW_LINEprocedure to add a line terminator.GET_LINEandGET_LINESdo not return lines that are not terminated by a line terminator.An error message is returned if the number of rows exceeds the row limit.
Output created by using the
PUTorPUT_LINEprocedure is buffered. The output cannot be retrieved until the PL unit that buffers the output returns to its caller.For example, OBClient does not display
DBMS_OUTPUTmessages until the PL program is completed. 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;