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 18:32:39
Message-ID: 372F0968-BD78-45EB-AE70-015DBF923EBC@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2024-05-19 18:35:42 Re: Updating 457 rows in a table
Previous Message Rich Shepard 2024-05-19 18:32:27 Re: Updating 457 rows in a table