Re: Updating 457 rows in a table

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Updating 457 rows in a table
Date: 2024-05-19 18:37:50
Message-ID: 7e82178c-1249-b592-bfea-5152563ceb4c@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 19 May 2024, Christophe Pettus wrote:

> Of course, you can probably also shorten the query to:
>
> UPDATE people SET active=true WHERE ...
>
> Where ... is the predicate you would have used in the SELECT id WHERE ...

Ah, yes. Hadn't thought of that. The statement would be
UPDATE people SET active=true WHERE email is not null;

Thanks, Christophe,

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2024-05-20 09:30:29 Re: Updating 457 rows in a table
Previous Message Rich Shepard 2024-05-19 18:35:42 Re: Updating 457 rows in a table