suppose in my table 10 rows are there , i want to update odd
rows salary as 90000 ? how u do it ? any one help me ? what
do we use here cursor-fetch or normal sql ?
Answer Posted / vaneeshkhurana
Basically we can create a structure where first fetch then
update the fetch 2 times and update once again fetch 2 times
and update once again fetch 2 times and update once... and
keep on fetching 2 times and updating it once till table
code 100 comes.
This will update only the odd rows.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to resolve deadlock issue
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?
What is explain plan in db2?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?
What are the bind parameters ibm db2?
What is reorg and runstats in db2?
What is the use of commit in db2?
Why do chiropractors use drop table?
Is ibm db2 free?
Is db2 a database?
What action db2 takes when a program aborts in the middle of a transaction?
What is the use of db2 optimizer?
What is bufferpool in db2?
What does sqlcabc has?