Check NULL Value In SQL Server

In this blog, we will learn about NULL value in SQL Server.

In this blog, we will see what NULL value in SQL is and how to check it.
If a field in a table is optional and we insert a new record or update it without adding a value to this field, then
the field will be saved with a NULL value.


It is very important to understand that a Null value is very difference from 0,' '. A field in a table with a NULL value means that the insert or update a record command left it blank .

Test for NULL Values?

We can't test for NULL values with comparison operators, such as =, <, or <>. For testing it, we have to use the IS NULL and IS NOT NULL operators.
IS NULL Syntax
  1. SELECT *From student WHERE Name IS NULL  
Record is not available.
  1. SELECT *From student WHERE Name IS NOT NULL  
Record is available.

Use "IS NULL" to look for NULL values.