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, 07 Jun 2002 08:20:08 -0700
Message-ID: <web-1502464@davinci.ethosmedia.com> (raw)
In-Reply-To: <200206071133.23179.dev@archonet.com>
Richard,
> I've been happily using statements like
> UPDATE a SET flag=1 FROM b WHERE a.id=b.id AND b.foo='x';
>
> While PG's FROM extension makes life simple, I can't believe there's
> not a way
> to do an update on a join using standard SQL. The two options I can
> think of
I don't understand why you're worried about this. The lack of UPDATE
.. FROM is widely regarded as an omission by the ANSI committee, and
most SQL RDBMS support it, including MS SQL Server and Oracle. I'm not
sure about MySQL, but MySQL doesn't support sub-selects either.
Is there a database you're tinking of that sticks to the strict SQL92
definitions? OpenBase, maybe?
-Josh Berkus
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: <web-1502464@davinci.ethosmedia.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