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 |
Can you search give an array in the WHERE clause of a db2 query?
What is copy book?
Is db2 relational database?
In a DB2-CICS program which is acts as co-ordinator and which is participant?
What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?
What happens in bind step in a db2 program?
What is meant by the attachment facility?
query to just fetch first matching row and stop execution. once one matching row is found ..no more records should be checked.. if the first record is matching.. the query must stop
How can you do the explain of a dynamic sql statement?
Can any one tell me about Restart logic in DB2.
How and when does the db2 enforces the unique key?
Which is faster delete or truncate?