What is a cursor?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

On which levels locks can be applied?

847


Can we insert update delete in view?

750


I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

1840


What are the 2 sqlcodes that are returned?

846


What are the contents of a dclmgen?

822


How to execute stored procedures?

831


What are the rules for db2 programming?

833


Why do we bind in db2?

853


How to take backup of table in db2?

789


What is the advantage in De-normalizing tables in DB2?

930


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

2094


Why cursor is used in db2?

754


Is db2 a mainframe?

775


What is the use of db2 optimizer?

805


Give a brief description of db2 isolation levels?

776