Difference between UNION ALL and UNION
- UNION: Performs a union operation on two result sets, excluding duplicate rows, and performs sorting by default rules.
- UNION ALL: Perform a union operation on two result sets, including duplicate rows, without sorting.