Which SQL condition is used to delete records where the value of a column is NULL?
Options
-
A.
WHERE column = NULL
-
B.
WHERE column IS NULL
-
C.
WHERE column == NULL
-
D.
More than one of the above
-
E.
None of the above
Correct Answer (Detailed Explanation is Below)
B.
WHERE column IS NULL
Detailed Explanation
- IS NULL: Checks whether a column contains a NULL value.
- Example: DELETE FROM employees WHERE department_id IS NULL;
- Using = NULL is not the correct way to test for NULL in SQL.
OOps! You are currently offline.