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 Isolation levels possible ?

5 Answers  


Assuming that a site's standard is that pgm name = plan name, what is the easiest way to find out which Will precompile of an DB2-COBOL program bomb, if DB2 is down?

1 Answers  


What is the meaning concurrency in the db2 database?

0 Answers  


What are the three DB2 date and time data types and their associated functions?

1 Answers  


Where can you declare a cursor in a cobol-db2 program?

0 Answers  


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

0 Answers   IBM,


Are views updateable?

0 Answers  


What if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.

1 Answers   Cap Gemini,


What do you mean by storage group (stogroup)?

0 Answers  


What is the difference between CS and RR isolation levels?

1 Answers  


How to get the ddl of a table in db2?

0 Answers  


What is the connection string to connect to the DB2 Database ?

0 Answers   MCN Solutions,


Categories