Received: from kss.net.au ([203.41.122.41]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0I2tA090850 for ; Wed, 17 Jan 2001 21:55:13 -0500 (EST) (envelope-from carolyn@greatpacific.com.au) Received: from greatpacific.com.au (coco [10.10.1.9]) by kss.net.au (8.8.7/8.8.7) with ESMTP id NAA04524 for ; Thu, 18 Jan 2001 13:54:40 +1100 Message-ID: <3A665AE3.CE43178B@greatpacific.com.au> Date: Thu, 18 Jan 2001 13:54:27 +1100 From: Carolyn Wong X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-sql@postgresql.org" Subject: update help Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/202 X-Sequence-Number: 867 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