The TO_REFCURSOR function converts a DBMS_SQL cursor ID to a REF CURSOR and returns the REF CURSOR. After conversion, you can operate on the cursor using native dynamic SQL.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support it.
Syntax
DBMS_SQL.TO_REFCURSOR(cursor_number IN OUT INTEGER) RETURN SYS_REFCURSOR
Parameters
Parameter |
Explanation |
|---|---|
| cursor_number | To be convertedDBMS_SQLCursor ID. The cursor must have been opened, parsed, and executed before conversion. |
Return value
Returns the converted REF CURSOR (SYS_REFCURSOR type).
Usage instructions
- The passed cursor must have sequentially completed the
OPEN_CURSOR,PARSE, andEXECUTEoperations. - After the conversion is complete, you can use native dynamic SQL to perform further operations on this
REF CURSOR.