UPDATE with multiple WHERE conditions

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: UPDATE with multiple WHERE conditions
Date: 2024-06-12 21:28:32
Message-ID: c9cf4869-9d6d-7165-3f9f-611446bf961@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with 3492 rows. I want to update a boolean column from
'false' to 'true' for 295 rows based on the value of another column.

Is there a way to access a file with those condition values? If not, should
I create a temporary table with one column containing those values, or do I
write a psql script with 295 lines, one for each row to be updated?

TIA,

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Muhammad Salahuddin Manzoor 2024-06-12 21:31:43 Re: UPDATE with multiple WHERE conditions
Previous Message Rich Shepard 2024-06-12 21:11:30 Definging columns for INSERT statements