THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » SQL Server 2005 » NULL   (RSS)
  • Summer SQL Teaser #4 Nulls and Counts

    First create this table CREATE TABLE Teaser (ID int) INSERT Teaser VALUES(1) INSERT Teaser VALUES(2) INSERT Teaser VALUES(1) INSERT Teaser VALUES(2) INSERT Teaser VALUES(NULL) Without running this try to figure out what the result will be SELECT COUNT(*), COUNT(ID), COUNT(DISTINCT ID) FROM Teaser For some more NULL summer fun you can read NULL ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on June 22, 2007
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement