Reported By: Tim Johnson Reported On: 12/28/2004 For: Version 4.15 Build 1
# 1931SQL COUNT() Aggregate Function Not Returning Correct Result When There are No Candidate Rows Found a problem with the Count() function. The following query returns null as its result.
Select Count(MY_Field_ID) from SomeTable where MY_Field_ID < 0
Comments and WorkaroundsThe workaround is to use the COALESCE or IFNULL function to convert any NULLs into 0 values.
ResolutionFixed Problem on 12/28/2004 in version 4.16 build 1