select * from orders where odate between '2010-01-01'and
'2010-03-31' How do u fetch this into cursor?

Answers were Sorted based on User's Feedback



select * from orders where odate between '2010-01-01'and '2010-03-31' How do u ..

Answer / muneer

Declare orders_cur cursor
for
select * from orders where odate between '2010-01-01'and
'2010-03-31'.

Open orders_cur

fetch orders_cur....

Hi friends i think that will the procedure ...if any mistake
suggest me

Is This Answer Correct ?    4 Yes 0 No

select * from orders where odate between '2010-01-01'and '2010-03-31' How do u ..

Answer / mahesh

don't use * in select statement while retrieving data from
database

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More DB2 Interview Questions

The only place of VSAM KSDS in DB2 is?

2 Answers   IBM,


Give a brief description of db2 isolation levels?

0 Answers  


What is the syntax for seeing the columns and data types of a table in the db2 database?

0 Answers  


What is the use of with ur in db2?

0 Answers  


SI Stud name Subject Marks Pass/Fail 1 Sham Maths 40 P 1 Sham Physics 50 P 1 Sham Bio 20 F 2 Ram Maths 40 P 2 Ram Physics 50 P 2 Ram Bio 60 P For the above data , write the SQL query for the student who passed in all the subjects . For eg : I want the data of only Ram coz he passed all subjects .

2 Answers   Cognizant,






Suppose if I need to update a column, how you do that using cursor?

2 Answers   Verizon,


How to check sequence on a table in db2?

0 Answers  


Mention a credible reason why select* is never given preference in an sql program that has been embedded.

0 Answers  


What language is db2 written in?

0 Answers  


What do you need to do before you do EXPLAIN?

1 Answers  


Lot of updates have been done on a table due to which indexes have gone haywire. What do you do?

2 Answers  


What happens to a tablespace when its recovery infromation has been removed and a full recovery is no longer possible?

2 Answers  


Categories