SQL IS NULL Operator | Querying Data from Single Table

SQL IS NULL Operator: To check for empty values (NULL values) in a database table column, we use the SQL IS NULL operator.

SQL IS NULL Operator

To check for empty values (NULL values) in a database table column, we use the SQL IS NULL operator. This is a logical operator that works as follows:

What Is NULL?

  • NULL in SQL means that the data is missing or unknown.
  • It shows that a field was not filled in or that the value does not apply.
  • A NULL value is not the same as a zero value or blank spaces.

— 1. It is used to get details of any table who don’t have any values or specified as null values (1st query).

— 2. You can also use IS NOT NULL to get opposite result of the IS NULL value (2nd query). Click for more!

SQL Example 1:

SELECT *
FROM customers
WHERE phone IS NULL;
SQL IS NULL Operator

SQL Example 2:

SELECT *
FROM customers
WHERE phone IS NOT NULL;
SQL IS NULL Operator

Watch Video!

Next Post >> #2.10) ORDER BY Clause

<<Previous Post #2.8) SQL REGEXP Operator

Vickey

Vickey

💼 Microsoft Engineer | Founder – Kingfisher Tech Tips
I simplify complex tech into easy, actionable insights.
📌 Topics I cover: Data Engineering, SQL Server, SSRS/PBIRS, Azure, PC Tech, Banking & Finance, YouTube Tips, PC Tech Tips & more.
🎥 Catch my videos & guides on Kingfisher Tech Tips & YouTube.
📬 Have a query? Let’s connect!

Leave a Reply

Your email address will not be published. Required fields are marked *