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 |
niranjankumark
Posting Yak Master
164 Posts |
Posted - 2007-12-20 : 08:20:10
|
Hi,i select same query in 2 server database.ex : server1 select a,b from customerresult :a b---------1 hi1 hello1 hisame query executed in another server ex : server 2select a,b from customerresult :a b---------1 hi1 hi1 helloIs it possible to change in order ??? it reflects major impact on my server when i compare both server are in sync...kindly reply soon |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-20 : 08:27:18
|
you need to specify the order of the records return using the ORDER BY clause. KH[spoiler]Time is always against us[/spoiler] |
 |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2007-12-20 : 08:27:23
|
Use an order by. Without order by, the order the results are retrieved is not guaranteed. |
 |
|
niranjankumark
Posting Yak Master
164 Posts |
Posted - 2007-12-20 : 08:32:46
|
i am not mentioning the order by..simply select statement with join |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-20 : 08:36:51
|
quote: Originally posted by niranjankumark i am not mentioning the order by..simply select statement with join
You should ! KH[spoiler]Time is always against us[/spoiler] |
 |
|
niranjankumark
Posting Yak Master
164 Posts |
Posted - 2007-12-20 : 08:43:08
|
ok fine ur point is valid .But i wish to know will not be same in order ??? |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-20 : 08:46:52
|
quote: Originally posted by niranjankumark ok fine ur point is valid .But i wish to know will not be same in order ???
You might or might not get the same order. As Rick pointed out, without using ORDER BY the order of the result is not guaranteed. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|