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 |
What language is db2 written in?
What technique is used to retrieve data from more than one table in a single SQL statement?
What is JOIN and different types of JOIN.
What is the SQL Communications Area and what are some of its key fields?
Give a brief description of db2 isolation levels?
What is isolation level?
Can we use group-by clause in sub-query? If 'yes' means,Will it be executed successfully or else If 'no' means why should we not using that method? Give me your suggestion please....
What are the 2 sqlcodes that are returned?
For unmatched rows returned from an outer join, the column values in the other table are set to null e.g If A OUTER JOIN B returns some unmatched rows from A, the corresponding column values in B will be set to null. What can be done so that a null value is not displayed for these columns?
What's the maximum number of volumes that can be added to a STOGROUP?
How and when does the db2 enforces the unique key?
why should we bind the DB2 program . What if we did not BIND a BD2 program ??
9 Answers Infosys, TCS, Xansa,