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


Please Help Members By Posting Answers For Below Questions

Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

735


What is universal database?

717


What is clone table?

684


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

764


How do I optimize a query in db2?

710






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.

2268


What is db2? Explain.

690


Is ibm db2 free?

664


What is db2 command?

669


How to resolve deadlock issue

18559


What does sqlcabc has?

705


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

682


How can record locking be achieved in those DB2 versions which do not support it?

720


What is blu acceleration in db2?

697


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

1898