View previous topic :: View next topic |
Author |
Message |
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Kev Beginner
Joined: 02 Jan 2003 Posts: 2 Topics: 0
|
Posted: Thu Jan 02, 2003 10:53 am Post subject: |
|
|
Scrollable cursors allow you to scroll through a set of results forward, backward, to the start, to the end, etc. See DB2 V7 manuals for detailed info. |
|
Back to top |
|
|
raj051076 Beginner
Joined: 05 Dec 2002 Posts: 64 Topics: 21
|
Posted: Sat Jan 04, 2003 3:03 pm Post subject: |
|
|
Scrollable cursor is a cool feature of DB2 version 7. We can scroll forward or backward once the cursor is open. There are two types of scrollable cursor sensitive and insensitive.
Also you need to use temprary tables to use scrollable cursors. Following key words are supported in scrollable cursors.
next
prior
first
last
current
before
after
absolute n
relative n
DECLARE <CURSORNAME> SENSITIVE STATIC SCROLL CURSOR
FOR SELECT EMPLOYEENAME, ADDRESS
FROM EMP
ORDER BY EMPLOYEEID;
OPEN <CURSORNAME>;
FETCH LAST <CURSORNAME> INTO :NAME, :ADDRESS; _________________ Rajib |
|
Back to top |
|
|
|
|