pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Richard Huxton <dev@archonet.com>
To: pgsql-sql@postgresql.org
Subject: Re: UPDATE ... FROM vs standard SQL
Date: Fri, 7 Jun 2002 11:50:55 -0700
Message-ID: <200206071150.55227.josh@agliodbs.com> (raw)
In-Reply-To: <200206071705.33642.dev@archonet.com>
References: <web-1502464@davinci.ethosmedia.com>
	<200206071705.33642.dev@archonet.com>


Richard,

> Tell me about it. Where I'm using MySQL on client web-servers I find myself 
> porting the data into PG to massage it then putting the results back into 
> MySQL. One of the things missing from the various reviews/comparisons on the 
> web is any actual comparison of usage for DBA tasks (as opposed to handling 
a 
> message-board app etc)

But MySQL does handle message-baord apps very well.  If only MySQL AB and 
NuSphere would stick to that and not try to poach in transactional database 
space ...

> Nope - mostly work with PG/MySQL/MS-SQL/Access. I use all the features at 
the 
> 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 = (SELECT field5
						FROM tableb
						WHERE tableb.field2 = 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 
WHERE clause (I'm not sure about SQL 2000).   For MS Access, well, forget 
using subqueries at all unless you have all day ...

And for MySQL, you're hosed.   Tell your clients they need a different 
database.

-- 
-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




view thread (6+ messages)

Message-ID: <200206071150.55227.josh@agliodbs.com>
Permalink:  ../200206071150.55227.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200206071150.55227.josh@agliodbs.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, dev@archonet.com
  Subject: Re: UPDATE ... FROM vs standard SQL
  In-Reply-To: <200206071150.55227.josh@agliodbs.com>

* 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