The OPEN_CURSOR function is used to open a new cursor.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_SQL.OPEN_CURSOR
RETURN INTEGER;
DBMS_SQL.OPEN_CURSOR
RETURN INTEGER;
DBMS_SQL.OPEN_CURSOR(
security_level IN INTEGER)
RETURN INTEGER;
Parameters
| Parameter | Description |
|---|---|
| security_level | Specifies the security protection level enforced for the opened cursor. Valid security level values are 0, 1, and 2. The details of the security levels are as follows:
|
Return value
The ID of the new cursor.
Considerations
When you no longer need this cursor, you must call
CLOSE_CURSORto close it.You can reuse a cursor to execute the same SQL statement multiple times or to execute a new SQL statement. When a cursor is reused to parse a new SQL statement, the content of the corresponding cursor data area is reset. Before reusing a cursor, you do not need to close and reopen it.
