Question - What’s the logical difference, if any, between the following SQL expressions?
Answer -
-- Statement 1
SELECT COUNT ( * ) FROM Employees
-- Statement 2
SELECT SUM ( 1 ) FROM Employees
They’re the same unless table Employee table is empty, in which case the first yields a one-column, a one-row table containing zero, and the second yields a one-column, one-row table "containing a null."