1.

Which keyword used with UNION does not retain duplicate rows?(a) ALL(b) NARROW(c) STRICT(d) DISTINCTThis question was posed to me in an international level competition.I would like to ask this question from Performing Multiple topic in chapter Using SQL to Manage Data of MySQL

Answer»

The CORRECT answer is (d) DISTINCT

For explanation: The keyword ‘DISTINCT’ used along with ‘UNION’ is SYNONYMOUS with just the ‘UNION’ statement. It produces only the distinct rows from the combination of the TWO tables in the SELECT QUERY.



Discussion

No Comment Found

Related InterviewSolutions