exam questions

Exam 1z0-882 All Questions

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

Exam 1z0-882 topic 1 question 21 discussion

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

A table (t1) contains 1000 random integer values in the first column (col1).The random values are in the range of 0-1000.
Examine this query:
SELECT col1 FROM t1 WHERE col1 <=100 UNION
SELECT col1 FROM t1 WHERE col1 >=900 ORDER BY col1 DESC
What is the expected output?

  • A. A list of all values, including duplicates, sorted in descending order in the ranges of 0-100 and 900-1000
  • B. A list of all random unsorted values, including duplicates, in the range of 0-100 followed by the list of all values, including in the range of 900-1000 sorted in descending order
  • C. A list of unique random values in the range of 0-100 followed by the list of unique values in the range of 900-1000 sorted in descending order
  • D. A list of all unique values sorted in descending order within the ranges of 0-100 and 900-1000
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
chehin
2 years, 7 months ago
The B says included duplicates
upvoted 1 times
...
chehin
2 years, 7 months ago
I lean towards C
upvoted 1 times
...
mschnittker
4 years, 3 months ago
I have tested it, the values come in DESC order. 1000 . . . 1 all are unique
upvoted 1 times
...
Akarim
4 years, 9 months ago
It seems it will be C
upvoted 3 times
...
Lara
5 years, 10 months ago
Isn't it D? Refer to: https://dev.mysql.com/doc/refman/5.6/en/union.html
upvoted 2 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