What is NULL?
- SQL course
- Beginner
- Lesson 59/115
- 4 min
Learn that NULL represents an unknown value.
What is NULL?
NULL means an unknown or missing value. It is not zero or empty text; it is the absence of a value.
SELECT name FROM customers
WHERE email IS NULL;This query finds customers whose email was not entered.
name is selected from customers. WHERE keeps only the rows where email IS NULL holds.
What is NULL? — details
Arithmetic with NULL gives NULL. Even NULL = NULL is not true; always check with IS NULL.
Practice What is NULL?
Select names from customers where email is null.
Starter code
-- null email
SELECT name
FROM customers
WHERESample solution
SELECT name
FROM customers
WHERE email IS NULLExpected output
name Mehmet Zeynep
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 What does NULL mean?
- An empty string
- An unknown value Correct answer
- Zero
- A negative number
Explanation: NULL is an unknown or missing value.
2 Null check
SELECT name FROM customers
WHERE email ____;
SELECT name FROM customers
WHERE email IS NULL;
Explanation: IS NULL is the right answer.
3 What is NULL: match the terms
| Term | Meaning |
|---|---|
NULL |
unknown |
IS NULL |
null check |
0 |
zero |
'' |
empty text |