exam questions

Exam 1z0-882 All Questions

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

Exam 1z0-882 topic 1 question 38 discussion

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

A table (t1) contains 1000 random integer values in the first column (col1). The random values range from 1 to 1000.
You execute this query:
SELECT col1 FROM t1 WHERE col1< 100

UNION -
SELECT col1 FROM t1 WHERE col1 BETWEEN 100 and 200

UNION ALL -
SELECT col1 FROM t1 WHERE col 1 >=900
What is the output?

  • A. A list of unique values within the ranges of 1-200 and 900-1000
  • B. A list of unique values within the range of 1-200 and a list of all values, including duplicates, on the table within the range of 900-1000
  • C. A list of all values , including duplicates, in the range of 1-200 and a list of unique values in the range of 900-1000
  • D. A list of all values, including duplicates, in the ranges of 1-200 and 900-1000
  • E. An error, because mixing UNION and UNION ALL in the same query is not permitted
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
Gruiou
4 years, 9 months ago
I think the answer is B as well.
upvoted 2 times
...
lorrazen
4 years, 11 months ago
I tried with some sample data.And I think the answer is B. If UNION ALL comes before UNION, the result will be distinct.
upvoted 2 times
...
Lara
5 years, 10 months ago
Isn't it A? Ref: https://dev.mysql.com/doc/refman/5.6/en/union.html
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