Can i use several WHEN conditions in UPDATE clause to update a single column.
I want to update table TABLE having columns ID and NAME:
Is below query correct?
UPDATE TABLE
SET id = CASE id
WHEN id IN (2, 3, 4) THEN 1
WHEN id= 5 THEN 8
WHEN id IN(9, 7) THEN 6
WHERE name = 'abc'