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
What is consistency token in db2?
What is bind package and plan in db2?
What is explain plan in db2?
What is dclgen (declaration generator)?
can we view the access paths created by dbrm ? how ? thx
in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?
What is deadlock in db2?
How to check last update on table in db2?
What is host variable in db2 cobol?
What are the contents of a dclmgen?
What are catalog tables in db2?
What are concurrency issues?
What is db2 optimizer?
How can you count the number of rows from a table tab?
What is cloudant database?