- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the usage of scrollable cursor for current positioning?
We can use SCROLLABLE CURSOR to directly point the cursor to the mentioned relative position. The relative position is the position of the row in the result table from the current row. For example, consider the table below.
ORDER_ID | ORDER_DATE |
---|---|
A22367 | 2020-07-28 |
A66756 | 2020-07-28 |
A77890 | 2020-07-29 |
A96832 | 2020-07-29 |
If the cursor is currently pointing to the 2nd absolute row i.e, ORDER_ID A66756 then the relative +2 position will be ORDER_ID A96832 and relative -1 position will be ORDER_ID A22367.
The syntax to use relative position in FETCH statement is−
EXEC SQL FETCH RELATIVE +2 ORDER_CURR INTO :ORDER-ID, :ORDER-DATE END-SQL
- Related Articles
- What is the usage of scrollable cursor for absolute positioning?
- What is the purpose and usage of SCROLLABLE CURSOR in COBOLDB2 program?
- What is the difference between SENSITIVE and INSENSITIVE scrollable CURSOR with syntax
- How can you move the cursor in scrollable result sets in JDBC?
- Write the syntax to declare a scrollable cursor on the ORDERS DB2 table.
- What is the usage of ZEROFILL for INT datatype?
- What is Competitive Marketing Positioning?
- What is the purpose and usage of “WHERE CURRENT OF” clause in a COBOL-DB2 program?
- What is meant by Market Positioning?
- FabricJS – Finding the current cursor position on the clicked Polygon object?
- What is the importance of a Cursor class in Java?
- Values for the CSS cursor property
- What is the purpose and usage of “FOR UPDATE OF” clause in a COBOL-DB2 program
- How to get the current colour of the character at cursor in IText using FabricJS?
- What is the basic difference between alternating current and direct current? What is the frequency of the alternating current in India?

Advertisements