You are here: Re: wrong select or insert into ? « MsSQL Server « IT news, forums, messages
Re: wrong select or insert into ?

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
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация