May 13, 2013 at 11:22 pm
Comments posted to this topic are about the item Union Forcing Distinct
May 14, 2013 at 4:14 am
Not an issue for me...this has always been the behaviour of UNION.
I've often used
select c,b FROM #a
UNION
select c,b FROM #a
to eliminate / identify duplicates.
As for multiple UNIONs / UNION ALLs it just applies them sequentially.
May 14, 2013 at 7:43 am
varchar(1)?
There is an exception to every rule, except this one...
May 14, 2013 at 10:02 am
Interesting - I wouldn't have suspected that UNION makes the result set from each separate select "distinct".
I would guess that a "UNION" is really a "UNION ALL", with a subsequent "SELECT DISTINCT" to return the rows to the user.
May 2, 2016 at 1:14 pm
Thanks for the script.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply