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
Give a brief description of db2 isolation levels?
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What is a trigger in the db2 database?
What are packages in db2?
When do you specify the isolation level?
What are types of indexes?
How do I import a csv file into db2?
What is db2 command?
What is the latest version of ibm db2?
What are the benefits of using the db2 database?
What is load replace in db2?
How do you stop a db2 database in linux?
How to find the number of rows in a db2 table?
How to check table size in db2 sap?
What is ibm db2 client?