Reply to Re: SELECT a random 10 records from table....easy newbie question

Your name:

Reply:


Posted by Hugo Kornelis on 08/17/07 22:44

On Fri, 17 Aug 2007 10:56:10 -0000, WhytheQ wrote:

>This comes up with nothing:
>'=====================
>USE myDatabase
>SELECT *
>FROM myTable
>TABLESAMPLE (1 ROWS)
>'====================
>
>...whereas this works:
>'=====================
>USE myDatabase
>SELECT *
>FROM myTable
>TABLESAMPLE (1 PERCENT)
>'====================
>
>Any ideas??

Hi J,

TABLESAMPLE won't give you the exact number of rows you asked for, but
an approximation. This is explained in Books Online (though not as
clearly as I hoped and thought it was).

Also see Erland's reply in your other thread.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

[Back to original 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

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