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 the difference between Primary key and unique index?
what are stage one indexable predicates?
Is it possible using max on a char column?
What is a DB2 bind?
What is a Database Request Module(DBRM)?
In BIND, isolation level parameter specifies the duration of page lock and ACQUIRE, RELEASE also do almost the same thing. What is the exact difference between the two? Do they work in conjunction while executing SQL queries and obtaining locks?
How can record locking be achieved in those DB2 versions which do not support it?
Are views updateable?
What is the SQL Communications Area and what are some of its key fields?
Why select is not preferred in embedded sql programs?
What is meant by a unit of recovery?
What is the difference between plan and package in db2?