I'm looking to update multiple rows in PostgreSQL in one statement. Is there a way to do something like the following?
UPDATE table
SET
column_a = 1 where column_b = '123',
column_a = 2 where column_b = '345'
I'm looking to update multiple rows in PostgreSQL in one statement. Is there a way to do something like the following?
|
|||||||||
|
You can also use
You can add as many columns as you like:
|
|||||
|
Yes, you can:
And working proof: http://sqlfiddle.com/#!2/97c7ea/1 |
|||||||||||||||||
|