1Z0-082 practice question 5 of 25
Which two statements are true about the ORDER BY clause when used with a SQL statement containing a SET operator such as UNION? (Choose two.)
Full set: 142 questionsA compound query accepts exactly one ORDER BY clause placed at the very end. That clause may refer only to expressions appearing in the first SELECT list; therefore only those column names (or their positions/aliases) are recognised. When UNION (without ALL) is used and no ORDER BY is supplied, the duplicate-elimination sort returns the rows in ascending order beginning with the first select-list column, so B and C are true.
A. Numeric positions are permitted but not mandatory; names or aliases from the first SELECT may also be used.
D. Separate ORDER BY clauses per SELECT are illegal unless each SELECT is nested; at the top level only one is allowed.
E. Multiple ORDER BY clauses at the same query level are rejected.
1. Oracle Database SQL Language Reference 19c, “Set Operators” – ORDER BY appears only once, after the last SELECT.
2. Same section – UNION returns the result in sorted order by default.
3. Oracle Database SQL Language Reference 19c, Table 7-3 – ORDER BY can use column names, aliases, or positions from first query block.
Keep practicing
Take the free 1Z0-082 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1Z0-082 practice questions
- Question 1Which three statements are true about using SQL*Plus?
- Question 2Which three statements are true about advanced connection options supported by Oracle Net…
- Question 3Which statement is true about the INTERSECT operator used in compound queries?
- Question 6Which three statements are true about the tools used to configure Oracle Net Services? (C…
- Question 7In your data center, Oracle Managed Files (OMF) is used for all databases. All tablespace…
- Question 10Which three statements are true about the Oracle Data Dictionary? (Choose three.)
