Interview Questions   Tutorials   Discussions   Programs   

DB2 - How to fetch multiple records without using cursor?

asked mar August 25, 2014 10:51 AM  

How to fetch multiple records without using cursor?


1 Answers

answered By Mswami   0  
Fetching Multiple Rows:
When you need to retrieve multiple rows, consider deploying a multi-row fetch to transfer more than one row using a single FETCH statement. This capability was added as of DB2 Version 8.

A multi-row FETCH retrieves multiple rows at one time into column arrays in your application program. By fetching multiple rows at once, your request can become more efficient, especially for distributed requests. The performance improvement using multi-row FETCH in general depends on several factors, such as whether the request is distributed, the number of rows to be fetched, the complexity of the SELECT statement, and the number of columns being fetched.
   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!