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

Why do we need to create an alias if we can directly use the table name? What are the benefits of referring a table name by its alias? Also, when should we go for alias and when for synonyms?

1 Answers  


What are the bind parameters ibm db2?

0 Answers  


I want to fetch the 10th row of a table which has been changed.How can I do it without going thru all the rows.

5 Answers  


What is precompiler in db2?

0 Answers  


What is deadlock in db2?

0 Answers  






What is the function of logging in the db2 database?

0 Answers  


i have an employment table whch has salary,dept,name? i want salary b/w 1000 to 5000 can anyone pls say the query for ths ?

8 Answers   Cap Gemini, CGI, EDS, IBM, Satyam, Wipro,


How to find the number of rows in a db2 table?

0 Answers  


What is correlation names?

1 Answers  


What will happen, while trying to close the closed cursor.

1 Answers  


What does the REORG Utility do?

2 Answers  


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

0 Answers  


Categories