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

What is blu acceleration in db2?

697


How connect db2 database to datastage?

866


What are packages in db2?

688


Why do we bind in db2?

736


What are the uses of db2 optimizer?

916






ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE

1705


What is universal database?

717


What is the difference between bind and rebind in db2?

1003


What is schema in db2?

666


What does db2 mean?

663


B37 abend during spufi?

1086


What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

823


How to retrieve rows from a db2 table in embedded sql?

845


What is performance tuning db2?

733


What is meant by explain?

742