Can you use a select query in a loop to fetch multiple rows?
If so what is the advantage of using a cursor?
Answer Posted / azharuddinsyed
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 |
Post New Answer View All Answers
How to get the ddl of a table in db2?
Why select is not preferred in embedded sql programs?
What is dbrm? What it contains? When it will be created?
What is the maximum size of a char data type in db2?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?
What is copy pending status in db2?
How to retrieve rows from a db2 table in embedded sql?
Is db2 a database?
How do you concatenate the firstname and lastname from emp table to give a complete name?
Which command is used to connect to a database in DB2 ? Give the Syntax.
What types of tables are there in the db2 database?
What is rct?
How do we specify index to include or not during bind process.
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?