To update the CUST_CREDIT_LIMIT column to NULL for all the customers, where CUST_INCOME_LEVEL has NULL in the CUSTOMERS table. Which SQL statement will accomplish the task?
Answer options
A
UPDATE customers SET cust_credit_limit = NULL WHERE cust_income_level IS NULL;
B
UPDATE customers SET cust_credit_limit = 0 WHERE cust_income_level = NULL;
C
DELETE FROM customers WHERE cust_income_level IS NULL;
D
ALTER TABLE customers SET cust_credit_limit = NULL;
Correct answer: UPDATE customers SET cust_credit_limit = NULL WHERE cust_income_level IS NULL;
Explanation
IS NULL is required for NULL comparison; SET cust_credit_limit = NULL explicitly sets the column to NULL.