Received: from shaked.cc.openu.ac.il (shaked.cc.openu.ac.il [147.233.145.65]) by hub.org (8.8.8/8.8.8) with ESMTP id FAA21575 for ; Sun, 18 Oct 1998 05:27:30 -0400 (EDT) (envelope-from herouth@oumail.openu.ac.il) Received: from [147.233.159.109] (herouth@mac-herouth.pc.openu.ac.il [147.233.159.109]) by shaked.cc.openu.ac.il (8.8.5/8.8.5) with ESMTP id LAA22994; Sun, 18 Oct 1998 11:23:38 +0200 (IST) X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: References: <199810150321.WAA24646@Jupiter.mcs.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 18 Oct 1998 11:24:53 +0200 To: Thomas Good , Leslie Mikesell From: Herouth Maoz Subject: Re: [SQL] Using the IN predicate in an UPDATE... Cc: pgsql-sql@postgreSQL.org At 14:37 +0200 on 15/10/98, Thomas Good wrote: > > Am I missing something here or is this the same as: > > UPDATE table1 SET id = 2 WHERE id = 1; > > ?? > > Les Mikesell > > les@mcs.com > > 3) Les, What are ya, some kinda smarta**? Yeah, somebody was missing > something, but it weren't you... ;-) Hmmm. Are you sure? The original query you presented had different semantics. It meant "If the recnum has any occurence with id=1, change all its occurences (even those with id=17) to id=2". That was the reason why I suggested an "exists" query instead. The above is only equivalent when each recnum has only one id. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma