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 rebind in db2?

1117


What is a plan and package in db2?

1150


What is commit in db2?

1104


What is the use of predicate?

1083


What do you mean by rollback?

1028


How many types of page locks can be held in db2?

1087


What is the role of union all and union

1185


What is db2 and what is the use of db2 optimizer?

1110


What is view db2?

1130


How do you select a row using indexes in db2?

1172


How do you simulate the explain of an embedded sql statement in spufi/qmf?

1138


What is database reorganization?

1181


What is multi row fetch in db2?

1100


What is the default page size of buffer pools?

1164


Which command is used to remove all rows from a table?

1175