Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 58494476C1F for ; Fri, 7 Jun 2002 15:32:48 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 04ED347665D for ; Fri, 7 Jun 2002 14:50:17 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1502803; Fri, 07 Jun 2002 11:50:15 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Richard Huxton , pgsql-sql@postgresql.org Subject: Re: UPDATE ... FROM vs standard SQL Date: Fri, 7 Jun 2002 11:50:55 -0700 X-Mailer: KMail [version 1.4] References: <200206071705.33642.dev@archonet.com> In-Reply-To: <200206071705.33642.dev@archonet.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200206071150.55227.josh@agliodbs.com> X-Archive-Number: 200206/81 X-Sequence-Number: 8046 Richard, > Tell me about it. Where I'm using MySQL on client web-servers I find myse= lf=20 > porting the data into PG to massage it then putting the results back into= =20 > MySQL. One of the things missing from the various reviews/comparisons on = the=20 > web is any actual comparison of usage for DBA tasks (as opposed to handli= ng=20 a=20 > message-board app etc) But MySQL does handle message-baord apps very well. If only MySQL AB and= =20 NuSphere would stick to that and not try to poach in transactional database= =20 space ... > Nope - mostly work with PG/MySQL/MS-SQL/Access. I use all the features at= =20 the=20 > psql prompt, but like to stick to the standard for app-generated queries. Well, this will work on any database with *full* SQL92 support: UPDATE tablea SET field3 =3D (SELECT field5 FROM tableb WHERE tableb.field2 =3D tablea.field1); ... and won't be as slow as an IN query. Quite. However, MS SQL 7.0 does not support correlated subqueries outside of the= =20 WHERE clause (I'm not sure about SQL 2000). For MS Access, well, forget= =20 using subqueries at all unless you have all day ... And for MySQL, you're hosed. Tell your clients they need a different=20 database. --=20 -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco