The UNION operation combines the results of two subqueries into a single result that comprises the rows that are returned by both queries.
This operation differs from a join, which combines columns from two tables. A UNION expression (optional keyword DISTINCT) removes duplicate rows from the result; a UNION ALL expression does not remove duplicates.
{0,1,2,2,2,2,3,N,N} UNION {1,2,2,3,5,5,N,N,N}
Ë{0,1,2,3,5,N}
{0,1,2,2,2,2,3,N,N} UNION ALL {1,2,2,3,5,5,N,N,N}
Ë{0,1,1,2,2,2,2,2,2,3,3,5,5,N,N,N,N,N}