Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

when does the SQL statement gets executed when you use
cursor in the application programming ?

Answer Posted / m4io

It depends
If the cursor needs materialization then it gets executed
on "open cursor" like answer 1 and 2 say.

else
the query for the next row gets executed on each fetch.

Materialization happens f.e. when sorts are used.


You can close a cursor without having sqlcode +100.

Suppose a cics transaction reads a table (1.000.000 rows)
via an index : if only 20 rows are needed it will only
request 20 rows (1 each fetch) and then close the cursor.

In batch : if I get 100 pens and need to distribute them to
the people who requested some in order of date-requested, I
will close cursor as soon as 100 pens are distributed.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is blu acceleration in db2?

1026


What is the maximum number of columns in a db2 table?

1234


What is bind package and plan in db2?

1021


What is difference between rollback and commit?

1112


How do you concatenate the firstname and lastname from emp table to give a complete name?

1037


What is the physical storage length of timestamp data type?

1039


What is the maximum size of a char data type in db2?

975


Explain dclgen.

1154


Which component is responsible for processing sql statements and selecting access paths?

1095


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

1004


by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?

9059


Is db2 a mainframe database?

962


What is ibm db2 client?

898


How to view db2 table structure?

975


How can you count the number of rows from a table tab?

1058