I'm needing to update multiple rows in the same sql transaction using PostgreSQL. From the post below: Update multiple rows in same query using PostgreSQL I see the following code:
UPDATE test AS t SET
column_a = c.column_a,
column_c = c.column_c
FROM (values
(123, 1, '---'),
(345, 2, '+++')
) AS c(column_b, column_a, column_c)
WHERE c.column_b = t.column_b;
BUT, this is only if you are updating all columns for each set of values, in which I'm not. Does anyone have a solution to this to allow multiple updates use just SQL alone (not plpgsql)?