One Day ... I was sitting with one of my team mate.. He just asked me casually what could be the value of SUM aggregate on a table containing no row...
to confuse me more he ran ....
SELECT COUNT(1) FROM @tmp
The result was zero (0)...
Then he changed the SQL to...
SELECT SUM(1) FROM @tmp
I was little confused; Can any body be able to solve my confusion... make sure you guess the answer without executing the above query...
to confuse me more he ran ....
SELECT COUNT(1) FROM @tmp
The result was zero (0)...
Then he changed the SQL to...
SELECT SUM(1) FROM @tmp
I was little confused; Can any body be able to solve my confusion... make sure you guess the answer without executing the above query...