Skip to content
RED SAGSkills
easy5 pts · first answer countssqlset-operations

UNION vs UNION ALL

Table a has values 1, 2, 2. Table b has values 2, 3. How many rows does the first query return, and how many does the second?

SELECT x FROM a UNION SELECT x FROM b;      -- query 1
SELECT x FROM a UNION ALL SELECT x FROM b;  -- query 2
Choose one answer