Union is inefficient because it is being scanned for duplicate values. If the merge does not intentionally delete duplicate rows, then use UNION ALL
Two the number of SQL statement fields to federate must be the same, and the field type is "compatible" (consistent);
If we need to display the results of the two SELECT statements as a whole, we need to use the union or UNION ALL keyword. Union (or union) is the function of merging multiple results together to display them.
The difference between Union and union all is that union automatically compresses duplicate results in multiple result sets, and union ALL displays all results, whether duplicates or not.
Union: Set (ADD) operations on two result sets, excluding duplicate rows, and sorting the default rules;
Union All: Set (ADD) operations on two result sets, including repeating rows, without sorting;
Union and UNION All Unions (add) differences