Returns the list of cursors in use by the current connection.
sa_list_cursors( )
Column name | Data type | Description |
---|---|---|
handle | UNSIGNED INTEGER | A unique handle identifying the cursor. |
scope | INTEGER | The scope of the call stack where the cursor is open. |
cursor_name | VARCHAR(128) | The cursor name. |
is_open | BIT | The indicator of whether the cursor is currently open (1). |
is_pinned | BIT | The indicator of whether the cursor is currently pinned in memory (1) in anticipation of reuse. |
fetch_count | UNSIGNED BIGINT | The number of rows that have been fetched from the cursor. |
The sa_list_cursors system procedure can be used in a CALL statement or in the FROM clause of a SELECT statement.
You must have EXECUTE privilege on the system procedure.
None
The following example returns the list of open cursors for the connection:
CALL sa_list_cursors();