On Mon, 10 Mar 2003 11:02:33 +0100, Alexander Pucher
<pucher@atlas.gis.univie.ac.at> wrote:
>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.
Either create your table without the third column and use a view
whenever you need the sum.
Or calculate the sum in a BEFORE INSERT / BEFORE UPDATE trigger.
Servus
Manfred