IS NULL and IS NOT NULL Operators in SQL
For Complete YouTube Video: Click Here
In this class, we will understand ‘IS NULL and IS NOT NULL’ Operators in SQL.
We have already discussed the concept of the LIKE operator in SQL.
Table of Contents
IS NULL and IS NOT NULL Operators in SQL
IS NULL Operator in SQL
IS NULL instructs to identify the column which have NULL values.
To understand this, we will consider the table as shown below.
Consider the query as shown below.
SELECT * FROM students where salary IS NULL;
The above query displays the rows whose salary value IS NULL.
The output of the query is as shown below.
IS NOT NULL Operator in SQL
IS NOT NULL instructs to identify the column which have NOT NULL values.
Consider the query as shown below.
SELECT * FROM students where salary IS NOT NULL;
The above query displays the rows whose salary value IS NOT NULL.
The output of the query is as shown below.