Re: update help

From: Tubagus Nizomi <nizomi(at)dnet(dot)net(dot)id>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: update help
Date: 2001-01-18 03:17:34
Message-ID: 01011810173404.01195@nizomi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

update t1
set amount = sum(b.amount)
from ts b
where a.id=b.id

On Thursday 18 January 2001 09:54, Carolyn Wong wrote:
> I'd like to know what's the correct SQL statement to do the following:
>
> update t1 a
> set a.amount = sum(b.amount)
> from t2 b
> where a.id = b.id

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-01-18 03:18:59 Re: update help
Previous Message Carolyn Wong 2001-01-18 02:54:27 update help