Re: UPDATE with multiple WHERE conditions

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: UPDATE with multiple WHERE conditions
Date: 2024-06-12 22:46:37
Message-ID: 78636a75-1750-234c-5b6d-148f583bc1@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 12 Jun 2024, Ron Johnson wrote:

> A plain UPDATE might work.
>
> UPDATE to_be_updated a
> SET bool_col = true
> FROM other_table b
> WHERE a.pk = b.pk
> AND b.field3 = mumble;
>
> (You can join them, right?)

Thanks, Ron.

Rich

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2024-06-12 22:47:24 Re: UPDATE with multiple WHERE conditions
Previous Message Rich Shepard 2024-06-12 22:43:12 Re: Definging columns for INSERT statements