Re: Updating 457 rows in a table

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Updating 457 rows in a table
Date: 2024-05-19 16:56:50
Message-ID: 1E14886A-BBCB-40E4-8231-1159D12BD261@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On May 19, 2024, at 09:54, Rich Shepard <rshepard(at)appl-ecosys(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ray O'Donnell 2024-05-19 16:57:41 Re: Updating 457 rows in a table
Previous Message Rich Shepard 2024-05-19 16:54:46 Updating 457 rows in a table