Re: [GENERAL] differnt behaviour of NULL in an aggregate and with an operator
Willy-Bas Loos wrote: > Hi, > > Why is it that > SELECT 1+null > evaluates to NULL, but > SELECT sum(foo) FROM (VALUES(1), (NULL)) AS v(foo) > evaluates to 1 ? SUM(x) ignores null input, like COUNT(x) etc. It's the sum of all non-null instances of x. There's some useful explanation of the va
[GENERAL] differnt behaviour of NULL in an aggregate and with an operator
Hi, Why is it that SELECT 1+null evaluates to NULL, but SELECT sum(foo) FROM (VALUES(1), (NULL)) AS v(foo) evaluates to 1 ? WBL