There are four types of cursors:
Client cursors – declared through Open Client calls (or Embedded SQL). Open Client keeps track of the rows returned from and buffers them for the application. Updates and deletes to the result set of client cursors can be performed only through Open Client calls. Client cursors are the most frequently used type of cursors.
Execute cursors – a subset of client cursors, for which the result set is defined by a stored procedure. The stored procedure can use parameters. Parameter values are sent through Open Client calls.
Server cursors – declared in SQL. If server cursors are used in stored procedures, the client executing the stored procedure is unaware of them. Results returned to the client for a fetch are the same as the results from a normal select.
Language cursors – declared in SQL without using Open Client. As with server cursors, the client is unaware of the cursors, and results are returned to the client in the same format as a normal select.
To simplify the discussion of cursors, the examples in this manual are only for language and server cursors. For examples of client or execute cursors, see your Open Client or Embedded SQL documentation.