exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 62 discussion

Actual exam question from Oracle's 1z0-071
Question #: 62
Topic #: 1
[All 1z0-071 Questions]

Which statement will execute successfully?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
super04
5 months, 1 week ago
1. The ORDER BY clause uses the column of the first SELECT query. 2. By default, the first column of the first SELECT query is used to sort the ouput in ascending order. 3. The ORDER BY clause accepts the column name or an alias. 4. You can use ORDER BY clause only once in a compound query. 5. The ORDER BY clause does not recognize the column names of the second SELECT query. To avoid confusion over column names, it is common practice to ORDER BY column positions.
upvoted 2 times
...
zouve
7 months, 1 week ago
A for sure
upvoted 1 times
...
Chandru007
1 year, 1 month ago
@cspro2410 A)If your running both select without order by means it will union and return only 2 columns and after giving order by 1,2 it will run successfully. This is because 1,2 represents two columns. B)In here it will union and it return one column only but in order by its given 1,2 so will fail C)Here it will union and it return one column but order by is happening on 3rd column D)Here union and it return two columns but order by happening on 3rd,4th column so a is correct
upvoted 4 times
...
cspro2410
1 year, 1 month ago
why C is incorrect ?
upvoted 1 times
ManAtWar
1 year ago
C is not correct since the second element tries to "order by 3". This means that the parser is trying to order by the 3rd element in the select clause. However, there's only 2 elements.
upvoted 1 times
zouve
6 months, 2 weeks ago
you mean 1 element it is sorting only from the elements from the 1st select
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago