I would like to know if there's a 'short' way (single query) to update certain columns, if their value equals to an integer.
Let's say that my table looks like this:
+------------+----+----+----+----+
| customerID | v0 | v1 | v2 | v3 |
+------------+----+----+----+----+
| 1 | 3 | 3 | 2 | 1 |
+------------+----+----+----+----+
and I would like to set all the values of integer 3 (except customerID
) to 0 - so the query will update column v0
and v1
.