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

Answer Posted / s

When you open the cursor the result set is built.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the role of schema in the db2 database?

642


Explain about rct.

639


How will you return the number of records in table?

508


Why db2 is called db2?

587


What is a plan and package in db2?

609






What are union and union all?

529


Is db2 free?

673


How can you find out the # of rows updated after an update statement?

631


What is a collection in db2?

572


What is db2 connect?

593


What is the difference between cursor stability and repeatable read isolation levels?

664


How to find primary key of a table in db2?

596


What are the uses of db2 optimizer?

805


What are foreign keys in db2?

607


SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.

2137