In a stored procedure (Oracle in my case), I want to add some values to an existing record. Problem is that both the existing value and the value to be added can be null. I
In SQL terms, when adding numbers, a result of NULL means there were no non-null numbers added.
This suggests that a sensible answer in SQL terms would be
CASE WHEN A IS NULL AND B IS NULL THEN NULL ELSE ISNULL(A, 0) + ISNULL(B, 0) END