When is the results table for the query in a DECLARE CURSOR
statement created?
Answer Posted / mani
the first one is correct i.e. when the open cursor statement
gets executed, the results table is created for the query in
declare cursor statement.
after that when fetch is done it is actually retrieved one
by one from the results table.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Explain the function of data manager.
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.
Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....
What are catalog tables in db2?
Which is faster delete or truncate?
What is a db2 table?
What are union and union all?
Why do we need reorg in db2?
What is a Foreign Key?
When do you specify the isolation level?
How to get the ddl of a table in db2?
What is bind plan?
What is the physical storage length of the data types date, time, and timestamp?
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.