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 done only through the Open Client calls.
Execute cursors – a subset of client cursors whose result set is defined by a stored procedure. The stored procedure can use parameters. The values of the parameters 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 not aware 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 not aware of the cursors, and the results are returned to the client in the same format as a normal select.
Client cursors, through the use of applications using Open Client calls or Embedded SQL, are the most frequently used form of cursors. To simplify the discussion of cursors, the examples in this manual are for language and server cursors only. For examples of client or execute cursors, see your Open Client or Embedded SQL documentation.
Copyright © 2005. Sybase Inc. All rights reserved. |