Why is it that "select null + 1" gives null but "select sum(a) from
table" where there are null entries returns an integer?
Shouldn't the sum() and "+" operators behave the same?
TAL=# select null + 0;
?column?
----------
(1 row)
TAL=# select * from a;
a
---
1
(3 rows)
TAL=# select sum(a) from a;
sum
-----
1
(1 row)
Thanks,
Jean-Christian Imbeault