RE: subqueries as values in updates - Mailing list pgsql-sql

From Francis Solomon
Subject RE: subqueries as values in updates
Date
Msg-id NEBBIFFPELJMCJAODNPKIEKOCDAA.francis@stellison.co.uk
Whole thread Raw
In response to subqueries as values in updates  (patrick.jacquot@anpe.fr)
List pgsql-sql
Hi,

The syntax you used works fine for me.

francis=# select version();                           version
---------------------------------------------------------------PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc
2.95.2
(1 row)

Hope this helps

Francis Solomon

> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of
> patrick.jacquot@anpe.fr
> Sent: 08 December 2000 13:00
> To: liste SQL
> Subject: [SQL] subqueries as values in updates
>
>
> hello, list.
> are subqueries alloved as values in an update command ?
> e.g.
>
> update a set a.attribute1 = a.attribute1 +
>     (select sum(b.attribute1) from b where b.attribute2=a.attribute2);
>
> If yes, how is the correct syntax ?
> If not, is there a hope for it in a future version ?



pgsql-sql by date:

Previous
From: patrick.jacquot@anpe.fr
Date:
Subject: subqueries as values in updates
Next
From: Stephan Szabo
Date:
Subject: Re: FOREIGN KEY errors.