19.5k views
4 votes
Which of the following set operators will display only the unique results of the combined SQL statements?

a. UNION
b. UNION ALL
c. INTERSECT
d. MINUS

User Matthewek
by
8.9k points

1 Answer

6 votes

Final answer:

The correct set operator to display only the unique results of combined SQL statements is UNION.

Step-by-step explanation:

The correct set operator to display only the unique results of the combined SQL statements is UNION.

Here is a step-by-step explanation:

  1. The UNION operator is used to combine the result sets of two or more SELECT statements into a single result set.
  2. When UNION is used, it automatically removes duplicate rows from the result set, resulting in only unique results.
  3. On the other hand, the UNION ALL operator includes all the rows from each SELECT statement, including duplicates.
  4. The INTERSECT operator returns only the rows that are common to both SELECT statements.
  5. The MINUS operator returns the distinct rows from the first SELECT statement that are not in the result set of the second SELECT statement.
User Jiexishede
by
8.5k points