Avatar of upobDaPlaya
upobDaPlaya

asked on 

Why is Null the result for a Sum calculation on a record not found

For the below code why would the result return 1 row and a value of Null for SUM ?  In my case StockID 25 does not exist so  my assumption is that no rows would  be found ?  Why is 1 row returned ?


Select
 SUM(Interest) As Total
From
Table Stocks
WHERE
StockID = 25
Microsoft SQL Server

Avatar of undefined
Last Comment
Jim Horn

8/22/2022 - Mon