Checking 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:
123SELECT name FROM country WHERE region IS NULL;
Swipe to start coding
Write an SQL query that returns the name
and capital
columns with no population.
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.44
Checking 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:
123SELECT name FROM country WHERE region IS NULL;
Swipe to start coding
Write an SQL query that returns the name
and capital
columns with no population.
Solution
Thanks for your feedback!
Awesome!
Completion rate improved to 2.44single