1Z0-007 · Question #198
You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator "=". What happens when the main query is executed?
The correct answer is D. The main query fails because the multiple-row subquery cannot be used with the comparison operator. The main query fails because the multiple-row sub-query cannot be used with the comparison operator. Only single-row query can use comparison operators, like =, <, >, <=, >, and <>. Incorrect Answers A: The main query fails because the multiple-row sub-query cannot be used with…
Question
You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator "=". What happens when the main query is executed?
Options
- AThe main query executes with the first value returned by the subquery.
- BThe main query executes with the last value returned by the subquery.
- CThe main query executes with all the values returned by the subquery.
- DThe main query fails because the multiple-row subquery cannot be used with the comparison operator.
- EYou cannot define a multiple-row subquery in the WHERE clause of a SQL query.
How the community answered
(27 responses)- A7% (2)
- B15% (4)
- C4% (1)
- D74% (20)
Explanation
The main query fails because the multiple-row sub-query cannot be used with the comparison operator. Only single-row query can use comparison operators, like =, <, >, <=, >, and <>. Incorrect Answers A: The main query fails because the multiple-row sub-query cannot be used with the comparison B: The main query fails because the multiple-row sub-query cannot be used with the comparison C: The main query fails because the multiple-row sub-query cannot be used with the comparison E: You can define a multiple-row sub-query in the WHERE clause of a SQL query, but error will be generated by different reason.
Topics
Community Discussion
No community discussion yet for this question.