← All 1Z0-071 Flashcard Decks

Set Operators Flashcards

7 cards from real 1Z0-071 practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Set Operators flashcards as text
  1. In Oracle SQL, the MINUS operator is the Oracle-specific equivalent of which ANSI SQL standard set operator?

    Answer: EXCEPT

    Oracle's MINUS operator is functionally equivalent to the ANSI SQL standard EXCEPT operator, both returning rows from the first query not found in the second.

  2. When multiple set operators are used in a single query without parentheses, which operator has the highest precedence in Oracle SQL?

    Answer: INTERSECT

    INTERSECT has higher precedence than UNION, UNION ALL, and MINUS in Oracle SQL, so it is evaluated first when no parentheses are used.

  3. What is the result of: SELECT id FROM t1 UNION SELECT id FROM t2 UNION ALL SELECT id FROM t3?

    Answer: Distinct rows from (t1 UNION t2) combined with ALL rows from t3 including duplicates

    UNION and UNION ALL have equal precedence and are evaluated left to right, so t1 UNION t2 is computed first with deduplication, then UNION ALL appends all rows from t3.

  4. Which of the following queries correctly places the ORDER BY clause when using set operators?

    Answer: SELECT id FROM emp UNION SELECT id FROM dept ORDER BY id;

    The ORDER BY clause must appear at the very end of the compound query after the final SELECT statement in a set operator expression.

  5. What does INTERSECT return when there are NO rows common to both result sets?

    Answer: An empty result set containing zero rows

    INTERSECT returns an empty result set with no rows when the two queries share no common rows; this is a valid outcome and not an error condition.

  6. Which set operator best describes a 'logical difference' or 'relative complement' operation between two sets in Oracle SQL?

    Answer: MINUS

    MINUS returns the logical difference between two sets by returning rows present in the first result set that are absent from the second result set.

  7. How many SELECT statements can be combined using set operators in a single Oracle SQL compound query?

    Answer: There is no practical limit imposed by Oracle

    Oracle SQL does not impose a strict practical limit on the number of SELECT statements that can be chained together using set operators in a single compound query.