1Z0-007 · Question #28
Examine the data from the ORDERS and CUSTOMERS tables. Evaluate the SQL statement: SELECT * FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'Smith'); What is the result…
The correct answer is D. Option D. The query fails because the sub-query returns more than one row: it is possible situation when there are some customers with name Smith. Incorrect Answers A: The query fails because the sub-query returns more than one row B: The query fails because the sub-query returns more…
Question
Examine the data from the ORDERS and CUSTOMERS tables. Evaluate the SQL statement:
SELECT * FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'Smith'); What is the result when the query is executed?
Exhibits
Options
- AOption A
- BOption B
- COption C
- DOption D
- EOption E
How the community answered
(60 responses)- A7% (4)
- B15% (9)
- C2% (1)
- D73% (44)
- E3% (2)
Explanation
The query fails because the sub-query returns more than one row: it is possible situation when there are some customers with name Smith. Incorrect Answers A: The query fails because the sub-query returns more than one row B: The query fails because the sub-query returns more than one row C: The query fails because the sub-query returns more than one row E: The query fails because the sub-query returns more than one row, not because the outer query and the inner query are using different tables.
Topics
Community Discussion
No community discussion yet for this question.

