Difficulty: Easy
Correct Answer: SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');
Explanation:
Introduction / Context:
Different but equivalent SQL predicates can express the same filter. Equality to a single value and membership in a single-item set are interchangeable in most DBMSs.
Given Data / Assumptions:
Concept / Approach:
The predicate STATE = 'VA' is equivalent to STATE IN ('VA') because the IN list contains exactly one element. The rest of the statement (SELECT columns and FROM table) must remain syntactically correct.
Step-by-Step Solution:
Verification / Alternative check:
Run both queries; they return identical result sets in any standard SQL engine.
Why Other Options Are Wrong:
Options A, B, C: Misuse 'IN' directly after SELECT or omit FROM; also C changes the value to 'V' which is not equivalent. They are syntactically incorrect or semantically different.
Common Pitfalls:
Forgetting that IN requires parentheses and a list; placing IN after SELECT rather than as part of the WHERE condition.
Final Answer:
SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');
Discussion & Comments