1406. Safe nullable comparison — SaaS — implementation variant 6

DBMS Published Updated 0 Views Verified
In a SaaS application, implement this production problem: Find rows where an old and new email are different, including NULL transitions. The API/service receives user input and must return or modify data safely. Give the SQL solution, explain why it works, and show how the same operation is called from the selected stack.
Looking for the latest Sarkari Result 2026 updates? Check the latest government exam results, merit lists and result updates on Sarkari Resultess.
Sarkari Resultess
Questions & Answers

Answer & Explanation

4 Answers
Verified Correct Answer

Option A

SELECT * FROM customer_audit WHERE NOT (old_email <=> new_email);
Additional Explanation
MySQL's NULL-safe equality operator makes NULL-to-value and value-to-NULL changes detectable.
Sarkari Resultess
Editorial Answer 1
Verified

Option B

DELETE FROM the_table;
Additional Explanation
Incorrect: it does not implement the stated business rule and may modify/fetch the wrong rows.
Sarkari Resultess
Editorial Answer 2
Verified

Option C

UPDATE the_table SET status='active';
Additional Explanation
Incorrect: it does not implement the stated business rule and may modify/fetch the wrong rows.
Sarkari Resultess
Editorial Answer 3
Verified

Option D

SELECT * FROM the_table;
Additional Explanation
Incorrect: it does not implement the stated business rule and may modify/fetch the wrong rows.
Sarkari Resultess
Editorial Answer 4