Examveda

The keyword used with UNION that retains duplicate rows is . . . . . . . .

A. ALL

B. NARROW

C. STRICT

D. DISTINCT

Answer: Option A

Solution (By Examveda Team)

This question is about how to combine results from multiple queries in MySQL. The UNION keyword is used to merge the results of two or more SELECT statements.

The UNION operator by default removes duplicate rows.

The question asks for the keyword that keeps duplicate rows. The answer is:

Option A: ALL

The UNION ALL operator combines the result sets of the multiple queries, including any duplicate rows.

Here's how to remember it:

* UNION removes duplicates.
* UNION ALL keeps all rows, including duplicates.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous