Forward-only (default) cursors  insensitive scrollable cursors

Chapter 18: Cursors: Accessing Data

Example table for scrollable cursors

The examples in this section are executed by a scrollable cursor. To generate the data in Table 18-4, execute:

select emp_id, fname, lname
from emp_tab
where emp_id > 2002000

The base table, emp_tab, is a datarows-locking table with a clustered index on the emp_id field. “Row position” is an imaginary column, whose values represent the position of each row in the result set. The result set in this table is used in the examples in the following sections, which illustrate both in ensitive and semi_sensitive cursors.

Table 18-4: Results of executing select statementii

Row position

employee id

first name

last name

1

2002010

Mari

Cazalis

2

2002020

Sam

Clarac

3

2002030

Bill

Darby

4

2002040

Sam

Burke

5

2002050

Mary

Armand

6

2002060

Mickey

Phelan

7

2002070

Sam

Fife

8

2002080

Wanda

Wolfe

9

2002090

Nina

Howe

10

2002100

Sam

West





Copyright © 2005. Sybase Inc. All rights reserved. insensitive scrollable cursors

View this book as PDF