What should be the output of the following two queries in sql server 2008?
select 2
except
select 0
union all
select 0
except
select 2
select 2
union all
select 0
The first query is giving output as 0 but I am expecting union of 2 and 0, while the second query is displaying expected result of 0 and 2 in result set.
Why is it so?