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:30:30
Message-ID: 98639d1a-dddf-38e3-49b3-63632136a0f@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 19 May 2024, Christophe Pettus wrote:

> 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.

Christophe,

That's a good idea; I can use a predicate to identify the rows to update.
That would be shorter than a long, comma-separated list.

Thanks,

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2024-05-19 18:32:27 Re: Updating 457 rows in a table
Previous Message Muhammad Ikram 2024-05-19 17:06:04 Re: Updating 457 rows in a table