Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » System procedures » Alphabetical list of system procedures

sa_list_cursors system procedure

Returns the list of cursors in use by the current connection.

Syntax
sa_list_cursors( )
Result set
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.
Remarks

The sa_list_cursors system procedure can be used in a CALL statement or in the FROM clause of a SELECT statement.

Privileges

You must have EXECUTE privilege on the system procedure.

Side effects

None

Example

The following example returns the list of open cursors for the connection:

CALL sa_list_cursors();