|
Posted by Dan Guzman on 08/24/05 15:16
Without ORDER BY, SQL Server is free to return results in any sequence.
This is usually the most efficient chosen by the cost-based optimizer.
Ordering of results may vary depending on indexes, statistics, number of
processors, concurrent queries, etc. The version, service pack, and hotfix
level can also influence ordering due to potential optimizer changes.
Consequently, one should never assume data will be returned in any
particular order unless ORDER BY is specified.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"adam" <ereuseen@wp.pl> wrote in message
news:dedop9$d60$1@nemesis.news.tpi.pl...
> Yes- you are right. I did it - I added a field ( lp int ) with integer
> from
> 1 to last row - and added to my question "order by lp"- there I get what I
> want.
> But there is some interesting - you say that there is no any ordering in
> RDBMS. So why I always get this row at 14 posiotion? There must be some
> "internal" ordering if SQL give me this row ALWAYS on 14 position - not on
> random position ( first time on 14 , next on 20 and so on ).
>
> best wishes
>
> Adam
>
[Back to original message]
|