How to update more then one record using update?
Answers were Sorted based on User's Feedback
Answer / pratap singh
For this concern you can use or oprator along with where
clause, Example
WHERE DEPT_ID='D110' OR 'D001' OR 'D105'
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / sivakumar sekharannair
update query without "where" command will update multiple
rows in the table;
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / selvam a
Update a table using a symbolic cursor:
UPDATE WHERE CURRENT OF limits the scope of DB2 updates to
one row at a time, specifically the row your cursor is
positioned on.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guna
UPDATE table1 set columnname = (SELECT columnname from
table2 where some condition)
You can also use EXISTS instead of '=' for updating
| Is This Answer Correct ? | 0 Yes | 2 No |
What is runstats and reorg in db2?
What is a synonym ?
What do you mean by rollback?
While creating a table, by mistake you have given size of one field as 10. But as per requirement size should be 8. What is your next step?
What is difference between alias and synonym in db2?
How to define the data items to receive the fetch items for the SQL?
Q4. How will you get the count of record without using COUNT verb in query?
What is difference between rollback and commit?
List some fields from sqlca?
How is deadlock resolved?
how does the defining of a stored procedure effect the size of a DB2 data base A) it increases the size of a data base B) it decreases the size of a data base C) it does not effect the size of the data base D) it changes the table space structures
When DB2 connection fails, will online program work or give errors.