The GET_LINE stored procedure retrieves one line of information from the buffer.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
DBMS_OUTPUT.GET_LINE (
line OUT VARCHAR2,
status OUT INTEGER);
Parameters
| Parameter | Description |
|---|---|
| line | Returns one line of information from the buffer without the last line break character. You must declare the type of the parameter as VARCHAR2 with a size equal to or greater than 32767 to avoid errors. |
| status | If the call is successful, the value of this parameter is 0. If no more lines exist in the buffer, the value of this parameter is 1. |
Considerations
You can choose to retrieve one line or an array of lines from the buffer. Call
GET_LINEto retrieve a single line of buffered information. To reduce the number of calls to the server, callGET_LINESwhen you want to retrieve an array of lines from the buffer.If you are using OBClient, you can issue the
SET SERVEROUTPUT ONcommand to automatically display this information.After you call the
GET_LINEstored procedure, the unretrieved lines are discarded before the nextPUT,PUT_LINE, orNEW_LINEcall to avoid confusing them with future information.