Discussion
Find the SQL statement below that is equal to the following: SELECT NAME FROM CUSTOMER WHERE STATE = 'VA';
Answer: D
Correct answer: SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');
IN tests membership of a list, and a list with one element is equivalent to an equality test, so STATE IN ('VA') means the same as STATE = 'VA'.
The other three options fail on syntax rather than on logic: they write IN CUSTOMER where the source table must follow FROM. That is the real test here - the clause naming the table is FROM, and IN is a predicate belonging inside WHERE.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development