Re: [SQL] Using the IN predicate in an UPDATE...
Herouth Maoz <herouth@oumail.openu.ac.il>
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Thomas Good <tomg@admin.nrnet.org>, Leslie Mikesell <les@Mcs.Net>
Cc: pgsql-sql@postgreSQL.org
Date: 1998-10-18T09:24:53Z
Lists: pgsql-sql
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