How to update multiple columns in single update statement in DB2
database, db2, sql, sql-update
Solution
The update statement in all versions of SQL looks like:
update table
set col1 = expr1,
col2 = expr2,
. . .
coln = exprn
where some condition
So, the answer is that you separate the assignments using commas and don't repeat the `set` statement.
Problem
I want to update multiple columns of a table in DB2 with single Update statement. Any hint or idea will be appreciable. Thanks.