Oracle
1Z0-071 · Question #110
View the Exhibit and examine the structure in the EMPLOYEES tables. Evaluate the following SQL statement: SELECT employee_id, department_id FROM employees WHERE department_id= 50 ORDER BY…
The correct answer is D. The statement would not execute because the ORDER BY clause should appear only at the end. See the full explanation below for the reasoning.
Question
View the Exhibit and examine the structure in the EMPLOYEES tables. Evaluate the following SQL statement:
SELECT employee_id, department_id FROM employees WHERE department_id= 50 ORDER BY department_id UNION SELECT employee_id, department_id FROM employees WHERE department_id=90 UNION SELECT employee_id, department_id FROM employees WHERE department_id=10; What would be the outcome of the above SQL statement?
Exhibit
Options
- AThe statement would not execute because the positional notation instead of the column name
- BThe statement would execute successfully and display all the rows in the ascending order of
- CThe statement would execute successfully but it will ignore the ORDER BY clause and display the
- DThe statement would not execute because the ORDER BY clause should appear only at the end
How the community answered
(44 responses)- A9% (4)
- B16% (7)
- C2% (1)
- D73% (32)
Community Discussion
No community discussion yet for this question.
