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
What is cloudant database?
How to create backup table in db2?
What is runstats utility in db2?
How to create db2 table in mainframe?
Which is faster delete or truncate?
What is bind and rebind in db2?
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What are catalog tables in db2?
What's The Error Code For Unique Index Voilation?
What is innodb buffer pool?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
How and when does the db2 enforces the unique key?
What is page size in db2?
What is the use of with ur in db2?
What are bind parameters in db2?