Understanding and working with NULL in SQL Server

Graphic representation of the difference between 0 and NULL Image taken from 9gag.com According to database theory, a good RDBMS must implement a marker to indicate "Missing or inapplicable information". SQL Server implements the lack of value with NULL, that is datatype independent and indicates missing value, so the logical validations are different, this is better known as Three-Valued Logic , where any predicate can evaluate to True , False or Unknown. I see a common error, referring to null like "Null values" but the correct definition of null is "Lack of value" so you must refer to it as null , in singular form. On this post, we will learn how to work with null in SQL Server. Declaring and assigning NULL For working with null, SQL Server engine uses the reserved word NULL to refer to it. It is datatype independent so you just have to assign it to any variable or field, using the equal operator =, as you can see on this example: D