1.

Which keyword used with UNION retains duplicate rows?(a) ALL(b) NARROW(c) STRICT(d) DISTINCTThe question was asked in an interview.The doubt is from Performing Multiple topic in division Using SQL to Manage Data of MySQL

Answer»

The correct OPTION is (a) ALL

Easy explanation: The keyword ‘ALL’ used along with ‘UNION’ is not synonymous with just the ‘UNION’ statement. It produces the duplicate rows, if they exist, from the combination of the two TABLES in the SELECT QUERY.



Discussion

No Comment Found

Related InterviewSolutions