Informatics Practices

Assertion (A): The INTERSECT operator returns all rows that are in both result sets.

Reasoning (R): The UNION and INTERSECT yields same output.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

SQL Queries

3 Likes

Answer

A is true but R is false.

Explanation
The INTERSECT operator returns all rows that appear in both interconnected tables, while the UNION operator returns all rows from interconnected tables, eliminating duplicate rows. Therefore, the UNION and INTERSECT operators do not yield the same output.

Answered By

3 Likes


Related Questions