Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHVbj-008PxZ-5L for pgsql-general@arkaria.postgresql.org; Wed, 12 Jun 2024 21:34:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sHVbg-007beS-VY for pgsql-general@arkaria.postgresql.org; Wed, 12 Jun 2024 21:34:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHVbg-007beK-KT for pgsql-general@lists.postgresql.org; Wed, 12 Jun 2024 21:34:13 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHVbf-001Lvf-2O for pgsql-general@lists.postgresql.org; Wed, 12 Jun 2024 21:34:12 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 84E842A2B7C for ; Wed, 12 Jun 2024 14:34:09 -0700 (PDT) Date: Wed, 12 Jun 2024 14:34:09 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: UPDATE with multiple WHERE conditions In-Reply-To: Message-ID: <75689be4-1965-b361-ce50-cf3fb5edfbb@appl-ecosys.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 13 Jun 2024, Muhammad Salahuddin Manzoor wrote: > You can use Temporary table. You could create a temporary table with one > column containing the condition values and then use it to update your main > table. This approach can be more flexible and cleaner than writing a > script with multiple update statements. Salahuddin, Thank you. I thought this would be the best approach. Regards, Rich