Oracle
1Z0-047 · Question #3
View the Exhibit and examine the data in the EMPLOYEES tables. Evaluate the following SQL statement: SELECT employee_id, department_id FROM employees WHERE department_id= 50 ORDER BY department_id…
The correct answer is D. The statement would not execute because the ORDER BY clause should appear only at the end of. See the full explanation below for the reasoning.
Question
View the Exhibit and examine the data 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 execute successfully and display all the rows in the ascending order of
- BThe statement would execute successfully but it will ignore the ORDER BY clause and display the
- CThe statement would not execute because the positional notation instead of the column name should
- DThe statement would not execute because the ORDER BY clause should appear only at the end of
How the community answered
(33 responses)- A3% (1)
- B15% (5)
- C9% (3)
- D73% (24)
Community Discussion
No community discussion yet for this question.
