update help

From: Carolyn Wong <carolyn(at)greatpacific(dot)com(dot)au>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: update help
Date: 2001-01-18 02:54:27
Message-ID: 3A665AE3.CE43178B@greatpacific.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tubagus Nizomi 2001-01-18 03:17:34 Re: update help
Previous Message tjk@tksoft.com 2001-01-18 01:40:23 Re: Select 'Sunday' in month ??