Advanced SQL Developer — Medium
Key points
- UNION involves sorting and comparing rows for duplicate elimination
- UNION ALL skips duplicate elimination for faster performance
- Use UNION when deduplication is necessary; prefer UNION ALL when duplicates are not important
- UNION ALL is more efficient when duplicates are impossible
Ready to go further?
Related questions
