TSQL's UNION operation really is a UNION
08 Mar 2011This one caught me a bit off guard. It turns out UNION in TSQL really is the mathematical union of the two result sets not just the concatenation of the involved results.
Include the keyword ALL to ensure duplicates are also returned.
ALL Incorporates all rows into the results. This includes duplicates. If not specified, duplicate rows are removed.