select * from orders where odate between '2010-01-01'and
'2010-03-31' How do u fetch this into cursor?
Answer Posted / mahesh
don't use * in select statement while retrieving data from
database
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
What is universal database?
What is clone table?
Which component is responsible for processing sql statements and selecting access paths?
How do I optimize a query in db2?
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.
What is db2? Explain.
Is ibm db2 free?
What is db2 command?
How to resolve deadlock issue
What does sqlcabc has?
How do you concatenate the firstname and lastname from emp table to give a complete name?
How can record locking be achieved in those DB2 versions which do not support it?
What is blu acceleration in db2?
can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well