Re: Updating 457 rows in a table

Christophe Pettus <xof@thebuild.com>

From: Christophe Pettus <xof@thebuild.com>
To: Rich Shepard <rshepard@appl-ecosys.com>
Cc: pgsql-general@lists.postgresql.org
Date: 2024-05-19T16:56:50Z
Lists: pgsql-general

> On May 19, 2024, at 09:54, Rich Shepard <rshepard@appl-ecosys.com> wrote:
> 
> Specifically, in the 'people' table I want to change the column 'active'
> from false to true for 457 specific person_id row numbers.

UPDATE people SET active=true WHERE id IN (...);

The ... can either be an explicit list of the ids, or a SELECT id WHERE if you have a predicate that selects the appropriate ids.