The TO_CURSOR_NUMBER function converts an open REF CURSOR into a DBMS_SQL cursor ID and returns that cursor ID. After conversion, you can use the relevant subprograms of DBMS_SQL to operate on the cursor.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support it.
Syntax
DBMS_SQL.TO_CURSOR_NUMBER(rc IN OUT SYS_REFCURSOR) RETURN INTEGER
Parameters
Parameter |
Explanation |
|---|---|
| rc | To be convertedREF CURSORThe file must be open before conversion. |
Return value
Returns the ID of the converted DBMS_SQL cursor (INTEGER type).
Usage instructions
- The passed-in
REF CURSORmust be a valid and open cursor; otherwise, aINVALID_CURSORerror is raised. - After the conversion is complete, you can use the subprograms of
DBMS_SQLto perform further operations on this cursor.