Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
RSQLSERVER
Starting Member
5 Posts |
Posted - 2009-08-30 : 19:24:22
|
There is a table Ai14THere is a table Bi23Now,select * from aunion select * from bReturnsi1234instead of i1423? ?????? ??? ?????????? ??? ???? ???????? ???? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
RSQLSERVER
Starting Member
5 Posts |
Posted - 2009-08-31 : 00:04:19
|
THanks a lot Tara, but my question is why i1234is the output as against the expected output:i1423? ?????? ??? ?????????? ??? ???? ???????? ???? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-31 : 02:23:18
|
quote: Originally posted by RSQLSERVER THanks a lot Tara, but my question is why i1234is the output as against the expected output:i1423? ?????? ??? ?????????? ??? ???? ???????? ????
It is because UNION when removing the duplicates also sort the result set (But the Order is not always guaranteed. Due to behavioural changes it may work in one version and not in other version)If you want the exact order, use UNION ALLMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|