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
How to fetch the last row from the table in SQL (db2)?
What happens in bind step in a db2 program?
What is null indicator in db2?
How and when does the db2 enforces the unique key?
Before you give the explain statement, what are the prerogatives?
How do I import data from excel to db2?
In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?
define clustering index.
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
What is a cursor in programming?
List out the data types available.
What is access path in db2?
What is an instance database?
How to compare data between two tables in db2?
What do you mean by storage group (stogroup)?