Class - 12 CBSE Computer Science — Assertion Reason Type Questions

Assertion. The UNION clause combines the rows of the participating tables, removing the duplicate rows.

Reason. To retain the duplicate rows in a UNION query, UNION ALL is used.

  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 Joins & Grouping

2 Likes

Answer

Both A and R are true and R is the correct explanation of A.

Explanation
The UNION clause combines the rows of the participating tables, removing duplicate rows from the final output. On the other hand, UNION ALL retains all duplicate rows from the tables in the final output.

Answered By

1 Like