- 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
Mandalika has Published 473 Articles
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
142 Views
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_IDORDER_DATEA223672020-07-28A667562020-07-28A778902020-07-29A968322020-07-29If the cursor is currently pointing to the 2nd absolute row i.e, ORDER_ID ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
271 Views
The SCROLLABLE CURSOR can be used to directly point the cursor position to the mentioned absolute position. The absolute position is the position of a particular row in the result table from the first row.We can fetch the absolute position by using ABSOLUTE parameter in the FETCH statement. For example, ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
1K+ Views
The INSENSITIVE SCROLLABLE CURSOR are sort of read only cursors in which the result table cannot change once the cursor is opened. The other applications also cannot update the INSENSITIVE SCROLLABLE CURSOR once it is opened. The SENSITIVE SCROLLABLE CURSOR, unlike INSENSITIVE are sensitive to changes made in the result ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
437 Views
A SCROLLABLE CURSOR can move in both forward and backward direction. In other words, it can fetch next as well as previous rows. A SCROLLABLE CURSOR is declared using the “SCROLL” clause in the DECLARE CURSOR.For example, if we want to declare a SCROLLABLE CURSOR on the ORDERS table then ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
364 Views
A cursor can move only in forward direction, which means that it can extract the next row after every fetch. It is not possible to extract the previous row using a cursor.For example, if our resultant cursor contains following rows−ORDER_IDORDER_DATEA223672020-07-28A667562020-07-28A778902020-07-29A968322020-07-29If our cursor is currently pointing to 3rd row i.e. order ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
663 Views
The ATOMIC and NON ATOMIC clauses are used with the multi-row insert. ATOMIC is always processed by default if any of the options is not given. The ATOMIC clause states that if there is a failure while inserting any one row during multi-row insertion then the entire query will be ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
552 Views
If we want to insert a multiple rows in a DB2 table using a single INSERT command then we have to define the host variable array and move the row data we want to insert in that array. We need to define another variable in the working storage section with ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
180 Views
The host variable needs to be declared as an array for the multi-row fetch. Also, we need to define another variable in the working storage section with the configuration S9(4) COMP, which will store the value of the number of rows to be fetched in a single fetch call.We can ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
803 Views
We can extract multiple rows from a DB2 table in a single FETCH call using a concept of multi row fetch.In a multi row fetch, we have to declare the cursor with the clause “WITH ROWSET POSITIONING”. The host variable in this case should be declared as an array.Therefore, in ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
120 Views
When we try to fetch the data from the CURSOR which is not open the query will fail. In this case the SQLCODE field of SQLCA will be populated with the DB2 error code - 501. As per the IBM documentation -501 error code states that−“THE CURSOR IDENTIFIED IN A ... Read More