Situation: I need distinct results from two tables, that both have duplicates. I would like to know if I should combine UNION and DISTINCT.
Example 1 - Only use distinct
SELECT DistinctValueFROM Table1UNIONSELECT DistinctValueFROM Table2
Example 2 - Combine distinct and union
SELECTDISTINCT DistinctValueFROM Table1UNIONSELECTDISTINCT DistinctValueFROM Table2
The results are the same, but are there any performance differences?