SQL SERVER – Count NULL Values From Column


The other day, I have received a very simple but interesting question by one of my earlier clients of Comprehensive Database Performance Health Check via email. The question was about how to count NULL values from the column.

Honestly, this is a very simple thing to do but I can totally understand why my client was confused and here is a very simple script to demonstrate the issue of counting NULL values from Column.

First, let us create a table and populate it with a few NULL Values.

— Create a Table CREATE TABLE Table1 (Col1 INT); — Insert Data INSERT INTO Table1