Multiple choice technology databases

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 is the correct SQL clause to eliminate duplicate values from query results. It returns only unique rows. UNION combines result sets, UNION ALL keeps duplicates, and DISTINCT ALL(*) is not valid SQL syntax.