Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Checking for NO Value | Filtering Data
Introduction to SQL with output checkers

bookChecking for NO Value

If a column doesn't contain any data, it's considered NULL. To determine if a value is NULL, you don’t just check for equality. Instead, you use the WHERE clause with IS NULL in a SELECT statement to find rows where the column’s value is NULL.

The syntax for it looks like this:

SELECT columns
FROM table 
WHERE column_name IS NULL;

Let's illustrate this with an example:

123
SELECT name FROM country WHERE region IS NULL;
copy
Task

Swipe to start coding

Write an SQL query that returns the name and capital columns with no population.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 6
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you explain what happens if I use `= NULL` instead of `IS NULL`?

What does the query return if there are no `NULL` values in the `region` column?

How do I check for values that are not `NULL`?

close

Awesome!

Completion rate improved to 2.44

bookChecking for NO Value

Swipe to show menu

If a column doesn't contain any data, it's considered NULL. To determine if a value is NULL, you don’t just check for equality. Instead, you use the WHERE clause with IS NULL in a SELECT statement to find rows where the column’s value is NULL.

The syntax for it looks like this:

SELECT columns
FROM table 
WHERE column_name IS NULL;

Let's illustrate this with an example:

123
SELECT name FROM country WHERE region IS NULL;
copy
Task

Swipe to start coding

Write an SQL query that returns the name and capital columns with no population.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

close

Awesome!

Completion rate improved to 2.44
SectionΒ 3. ChapterΒ 6
single

single

some-alt