what is the use of cursors?

Answers were Sorted based on User's Feedback



what is the use of cursors?..

Answer / bala

If the query inside the program retrieves only one row, there is no need to CURSOR.
If the program has to process the multiple rows that are retrieved by the query,
CURSOR is needed. Because, host variables can accommodate data from only one row at a time. By Declaring the cursor, multiple rows can be fetched one at a time and assign it to host variables for processing.

Is This Answer Correct ?    9 Yes 0 No

what is the use of cursors?..

Answer / guest

Cursors are used for providing multiple rows to process in
host language by fetching one row at a time.

Is This Answer Correct ?    7 Yes 0 No

what is the use of cursors?..

Answer / siri

it is use to retrive more than one row for an sql query return in application program....with out using cursors then it abbends with an sql code -811...

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More DB2 Interview Questions

What are the different methods of accessing db2 from tso? How is the connection established between TSO & DB2?

3 Answers   Tech Mahindra,


When DB2 connection fails, will online program work or give errors.

1 Answers   Virtusa,


What is the difference between db2 and oracle?

0 Answers  


When is the authorization check on DB2 objects done - at BIND time or run time?

1 Answers  


What is a page in db2?

0 Answers  






What is the difference between primary key & unique index ?

6 Answers   Patni, Temenos,


List out the buffer pools in db2

0 Answers  


Suppose we are doing transaction in a table and abend happened in between. Suppose i have completed the transaction upto X rows and I want to start the transaction again where the abend happened. I don't want to do the transaction from the first record. Then what i have to do.

9 Answers   Cap Gemini,


What is the function of logging in the db2 database?

0 Answers  


What is ACQUIRE/RELEASE in BIND?

3 Answers   Cognizant,


What are db2 error codes -305 and -407. What is the difference between these 2 error codes ?

1 Answers  


is it possible to get -811 error when you use cursors. why?

2 Answers   IBM,


Categories