0
0
SQLquery~10 mins

IS NULL vs equals NULL in SQL - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select rows where the column 'age' has no value.

SQL
SELECT * FROM users WHERE age [1];
Drag options to blanks, or click blank then click option'
A= NULL
BIS NOT NULL
C= 0
DIS NULL
Attempts:
3 left
💡 Hint
Common Mistakes
Using '= NULL' instead of 'IS NULL' causes no rows to be returned.
Confusing NULL with zero or empty string.
2fill in blank
medium

Complete the code to select rows where the column 'email' is not missing.

SQL
SELECT * FROM contacts WHERE email [1];
Drag options to blanks, or click blank then click option'
AIS NOT NULL
B= NULL
C= ''
DIS NULL
Attempts:
3 left
💡 Hint
Common Mistakes
Using '= NULL' which never matches any row.
Using '= ''' which checks for empty string, not NULL.
3fill in blank
hard

Fix the error in the query to correctly find rows where 'score' is missing.

SQL
SELECT * FROM results WHERE score [1];
Drag options to blanks, or click blank then click option'
A!= NULL
B= NULL
CIS NULL
D= 0
Attempts:
3 left
💡 Hint
Common Mistakes
Using '= NULL' or '!= NULL' which always return false.
Confusing NULL with zero or other values.
4fill in blank
hard

Fill both blanks to select rows where 'last_login' is missing and 'status' is active.

SQL
SELECT * FROM users WHERE last_login [1] AND status = [2];
Drag options to blanks, or click blank then click option'
AIS NULL
B'active'
C'inactive'
D= NULL
Attempts:
3 left
💡 Hint
Common Mistakes
Using '= NULL' instead of 'IS NULL'.
Forgetting quotes around string values.
5fill in blank
hard

Fill all three blanks to select rows where 'comment' is not missing, 'rating' is greater than 3, and 'verified' is true.

SQL
SELECT * FROM feedback WHERE comment [1] AND rating [2] 3 AND verified = [3];
Drag options to blanks, or click blank then click option'
AIS NOT NULL
B>
CTRUE
DIS NULL
Attempts:
3 left
💡 Hint
Common Mistakes
Using '= NULL' or '!= NULL' for NULL checks.
Using '=' instead of '>' for rating comparison.
Using 1 or 'true' (string) instead of TRUE (boolean).