what is the use of cursors?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / guest
Cursors are used for providing multiple rows to process in
host language by fetching one row at a time.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / siri
it is use to retrive more than one row for an sql query return in application program....with out using cursors then it abbends with an sql code -811...
| Is This Answer Correct ? | 2 Yes | 0 No |
What is a db2 package?
When the like statement is used?
Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
Suppose I have a program which uses a dynamic SQL and it has been performing well till now. Off late, I find that the performance has deteriorated. What happened?
How do u achieve record level locking in DB2 versions when record level locking is not allowed?
How do you run JCL in cobol program
Mention the various locks that are available in db2.
assume ther are 5000 records in a database and want to fetch using cursor. cursor fetches only 3000 records and fetch is not happening for remaining 2000 records. why it happens and how to rectify it
What is the role of data manager in the db2 database?
What is a dbrm in db2?
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....