Comparing Missing Values
Understand how to properly compare and handle NULL values in SQL for effective data cleaning. Learn why the equality operator does not work with NULLs and how to use IS, IS DISTINCT FROM, and IS NOT DISTINCT FROM to compare missing values safely. This lesson helps you prepare your data accurately for analysis by mastering missing value comparisons.
We'll cover the following...
We'll cover the following...
Overview
Before we start analyzing data, we usually need to clean it first. Data cleaning is an important part of this process, and handling missing values is a large part of that.
Missing data in SQL
Missing data in SQL is represented by the special value NULL. We already know that some functions, such as aggregate functions, handle NULL values differently. For example:
As you can see, the ...