What is a cursor?

Answers were Sorted based on User's Feedback



What is a cursor?..

Answer / guest

A cursor is a programming device that is used to handle the
rows that are returned by the query as the host language
(cobol) can handle only one row at a time. its also a small
file that has the result set. The cursor has to be
declared,opened, fetched and closed to access the data
returnee by the query.

Is This Answer Correct ?    2 Yes 0 No

What is a cursor?..

Answer / vinod babu bachina

In DB2 cursor is used to fetch more than one row from a DB2
table. But cursor can fetch only one row at a time. Suppose
if ur retrieving more than one row from table , u have to
use cursor only. If u use SELECT instead of cursor then it
leads to error '' more than one row selected in select'.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is correlated subquery?

1 Answers  


How to take backup of table in db2?

0 Answers  


How can you get the number of rows impacted by the last executed query?

1 Answers  


What does reorg do in db2?

0 Answers  


what is db2 restart?

0 Answers  






when i am trying to update a table having 1000 rows. the program abends.how we will come to know the last successful updated row was. we are not using any commit operations

3 Answers   IBM,


How can you quickly find out the # of rows updated after an update statement?

0 Answers  


What is the syntax for creating a table in the db2 database?

0 Answers  


What is the difference between dbm cfg and db cfg file in db2 ?

0 Answers   MCN Solutions,


If the main program has only cobol statements and subprogram has the db2 statements what is the procedure for precompilation. for which program we need to do the precompilation

1 Answers   IBM,


What are common abends

1 Answers   SPIC, Virtusa,


Explain how can you do the explain of a dynamic sql statement?

0 Answers  


Categories