when does the SQL statement gets executed when you use
cursor in the application programming ?
Answer Posted / mna
The process of using cursor is:
1. declare the cursor in working storage: You will write
the SQL query here
2. open the declared cursor : this is when the actual SQL
query is executed and the fetched rows are moved to the
cursor storage.
3. Fetch rows from cursor : Reading rows one by one on the
Cursor just like we read records from a sequential file
4. Close cursor : While fetching if we get an SQLCODE=+100
it is the end of the cursor just like we encounter eof
while reading records from a sequential file. Once this
condition is encountered we will close the cursor.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain about dbrm.
Explain about rct.
Is schema the same as database?
What are the various data types available in db2?
What is cobol db2?
How do you find the maximum value in a column in db2?
Explain db2.
Define sqlca.
What is the role of data manager in the db2 database?
What is difference between rollback and commit?
How do we specify index to include or not during bind process.
Mention the downsides of page level lock.
Why do chiropractors use drop table?
What are foreign keys in db2?
What are db2 tables?