Oracle
1Z0-882 · Question #98
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…
The correct answer is B. A list of unique values within the range of 1-200 and a list of all values, including duplicates, on. See the full explanation below for the reasoning.
Question
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?
Options
- AA list of unique values within the ranges of 1-200 and 900-1000
- BA list of unique values within the range of 1-200 and a list of all values, including duplicates, on
- CA list of all values , including duplicates, in the range of 1-200 and a list of unique values in the
- DA list of all values, including duplicates, in the ranges of 1-200 and 900-1000
- EAn error, because mixing UNION and UNION ALL in the same query is not permitted
How the community answered
(67 responses)- A1% (1)
- B78% (52)
- C3% (2)
- D13% (9)
- E4% (3)
Community Discussion
No community discussion yet for this question.