In SQL Server 2008 I have a behaviour I don't understand.
I'm doing a UNION between two select statements.
- First select returns 20745 rows
- Second select returns 0 rows
When I using union bewteen the two selects, I get 20740 rows, I would exspect 20745 as union only returns distinct values.
To get the excepted result I used union all but there is something I don't understand about it. Does anyone have an explanation?