Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by James Travis Understanding the difference between IS NULL and = NULL RE: Understanding the difference between IS NULL and = NULL
Mike C
SSC-Insane
Points: 23224
More actions
June 3, 2005 at 10:59 pm
#563057
As pointed out previously, COUNT(column1) eliminates NULLs from the final result set, per the ANSI SQL-92 standard. COUNT(*) does not. Try this instead:
Select Count(*), PremiumGroup From RetireePremiums
Group by PremiumGroup
Order by PremiumGroup