Sectionย 1. Chapterย 26
single
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;
Task
Swipe to start coding
Write an SQL query that returns the name and capital columns with no population provided.
Solution
Everything was clear?
Thanks for your feedback!
Sectionย 1. Chapterย 26
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat