In SQL, is there a difference between "sum(colA)+sum(colB)" and "sum(colA+colB)"? If so, what is it?
Sigiloso
The answer expected by the interviewer was that sum(colA+colB) wouldn't work if either column contained a null value, whereas sum(colA)+sum(colB) would continue to work. On a personal note, such silliness arises only when someone is incompetent enough to not use NaN to represent missing values.