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


Please Help Members By Posting Answers For Below Questions

What are the various data types available in db2?

625


What are the contents of dclgen?

641


What is alias in db2?

559


Define db2 and its databases?

612


What is db2 purescale?

537






What is db2?

732


How can tablespace be moved to another dasd volume that is allocated for that tablespace?

736


What is clone table?

587


How do you pull up a query which was previously saved in qmf?

661


How to access db2 tables in mainframe?

605


If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2

1567


what is diffrence b/w file-aid tool and file-aid utility???

4166


What is reorg?

610


List out the buffer pools in db2

615


What is the physical storage length of time data type?

661