Fetch Data Rows Using Cursors

A fetch completes the cursor result set and returns one or more rows to the client. Depending on the type of query defined in the cursor, SAP ASE creates the cursor result set either by scanning the tables directly or by scanning a worktable generated by the query type and cursor type.

The fetch command positions a nonscrollable cursor before the first row of the cursor result set. If the table has a valid index, SAP ASE positions the cursor at the first index key.