NULL Handling · Question 20 · Hard
In SQL's three-valued logic, which of these expressions evaluates to FALSE (not to UNKNOWN)?
- NULL AND TRUE
- NULL OR FALSE
- NULL AND FALSE
- NOT (NULL = NULL)
Answer and explanation
Answer: C. NULL AND FALSE
Explanation: AND is FALSE as soon as one side is FALSE, whatever the unknown side might be, so NULL AND FALSE is FALSE. NULL AND TRUE and NULL OR FALSE depend on the unknown value and stay UNKNOWN, and NOT of UNKNOWN is UNKNOWN.
Previous: Table Parcel: id | city | agent 1 | Pune | Ravi 2 | Pune | NULL 3 | Indore |…
Practise null handling
Try a fresh set of null handling questions with an explanation after every answer, free and without signing up: NULL Handling practice. Or sit a full placement mock test.
More null handling questions
- Table Staff: id | name | dept | bonus 1 | Anita | HR | 5000 2 | Bhavesh | IT |…
- Table Parcel: id | city | agent 1 | Pune | Ravi 2 | Pune | NULL 3 | Indore |…
- Table Parcel: id | city | agent 1 | Pune | Ravi 2 | Pune | NULL 3 | Indore |…
More sql practice
SQL Functions & CASE · UNION, INTERSECT & EXCEPT · Tables, Keys & Constraints · DML & Transactions · SELECT, WHERE & ORDER BY · SQL Joins · Aggregates & GROUP BY · Subqueries & CTEs
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge