From: Leslie Mikesell <les@Mcs.Net>
To: tomg@admin.nrnet.org
Cc: herouth@oumail.openu.ac.il
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Using the IN predicate in an UPDATE...
Date: Wed, 14 Oct 1998 22:21:09 -0500 (CDT)
Message-ID: <199810150321.WAA24646@Jupiter.mcs.net> (raw)
In-Reply-To: <Pine.LNX.3.96.981014085503.5064A-100000@admin.nrnet.org>
According to Thomas Good:
> This query takes 20 years (poetic licence invoked ;-).
> Do you have a smarter way to accomplish this end:
>
> UPDATE table1 SET id = 2
> WHERE rec_num IN
> ( SELECT rec_num
> FROM table1
> WHERE id = 1
> );
Am I missing something here or is this the same as:
UPDATE table1 SET id = 2 WHERE id = 1;
??
Les Mikesell
les@mcs.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: les@Mcs.Net, tomg@admin.nrnet.org, herouth@oumail.openu.ac.il
Subject: Re: [SQL] Using the IN predicate in an UPDATE...
In-Reply-To: <199810150321.WAA24646@Jupiter.mcs.net>
References: <Pine.LNX.3.96.981014085503.5064A-100000@admin.nrnet.org> <199810150321.WAA24646@Jupiter.mcs.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox