what is the use of cursors?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a view in db2?

785


What are the uses of db2 optimizer?

1033


What is node in db2?

809


What is db2 bind process?

933


Explain package in db2 and its advantages?

832


If I have a view which is a join of two or more tables, can this view be updateable?

895


What are packages in db2?

780


How do I add a column in db2?

778


What is db2 and what is the use of db2 optimizer?

831


What is db2 command?

768


What is collection in db2 bind?

768


What is reorg?

835


What is the role of schema in the db2 database?

904


What is db2 bind?

809


What is the physical storage length of timestamp data type?

853