UNION & UNION ALL in SQL
In SQL, UNION and UNION ALL and are operators used to vertically concatenate two or more results.
The key difference between UNION ALL and UNION is:
To ensure the correct use of UNION ALL and UNION, remember to follow these rules:
1. The number of columns in each SELECT statement must match.
2. The data types (e.g. INT, VARCHAR, DATETIME, etc.) of the columns must match.
3. The columns selected in both SELECT statements must be in the same order.