Sum of two rows - Mailing list pgsql-novice

From Alexander Pucher
Subject Sum of two rows
Date
Msg-id 3E6C62B9.2070908@atlas.gis.univie.ac.at
Whole thread Raw
Responses Re: Sum of two rows
List pgsql-novice
Hi,

this might be an obvious thing, but still I'm biting on this for some time:

Let's pretend  I want to have a table with 3 columns.
The first and second should each hold an integer value, the third should
hold the sum of column1 + column2 as an integer.

The idea behind this table should be that the sum is automatically
updated, each time I change one of the values in either of the first two
columns.

Best regards,
alex

--
________________________________________________________

Institut fuer Geographie und Regionalforschung
Universitaet Wien
Kartografie und Geoinformation

Departement of Geography and Regional Research
University of Vienna
Cartography and GIS

Universitaetstr. 7, A-1010 Wien, AUSTRIA

Tel: (+43 1) 4277 48644
Fax: (+43 1) 4277 48649
E-mail: alexander.pucher@univie.ac.at

FTP: ftp://ftp.gis.univie.ac.at
WWW: http://www.gis.univie.ac.at/karto
--------------------------------------------------------
Virtual Map Forum: http://www.gis.univie.ac.at/vmf
--------------------------------------------------------
It's not that I'm afraid to die,
I just don't want to be there when it happens -- Woody Allen



pgsql-novice by date:

Previous
From: "cristi"
Date:
Subject: select
Next
From: Manfred Koizar
Date:
Subject: Re: Sum of two rows