Can you use a select query in a loop to fetch multiple rows?
If so what is the advantage of using a cursor?
Answers were Sorted based on User's Feedback
No. In cobol-db2 program, the result of single select should be only one row.
For multi row fetch we must use cursor, else program will abend with -811 sql code.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / satheesh reddi
no...for that we are using cursors. due to cursors we can retrieve or fetch number of rows at a time from the table
| Is This Answer Correct ? | 0 Yes | 0 No |
Normalization in DB2 – first normal form, second normal form
Do we need cursor for Count(*)?
What action db2 takes when a program aborts in the middle of a transaction?
What is db2 stogroup?
How do I import data from excel to db2?
How do you leave the cursor open after issuing a COMMIT? (for DB2 2.3 or above only)
i have a db2 variable how do u declare tht into working storage section ?
What is dpf in db2?
What is dbrm library?
what is a plan and how do you refer the plan in the program?
What is consistency token in db2?
Which DB2 catalog tables are used to produce a list of table column by table for all tables in a database?