Multiple choice technology mainframe

How do you eliminate duplicate values in DB2 SELECT?

  1. Use SELECT UNION(*)...in db2 query

  2. Use SELECT DISTINCT...in db2 query

  3. Use SELECT UNION ALL(...)...in db2 query

  4. Use SELECT DISTINCT ALL(*)...in db2 query

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

SELECT DISTINCT eliminates duplicate rows from DB2 query results by returning only unique rows. DISTINCT is the standard SQL keyword for removing duplicates. UNION combines results from multiple queries (removing duplicates), UNION ALL keeps all rows including duplicates, and DISTINCT ALL(*) is not valid SQL syntax.