table sample percent sql server


The rows retrieved are random and they are are not in any order
Example 1:
SELECT FirstName,LastNameFROM Person.Contact
TABLESAMPLE SYSTEM 
(10 PERCENT)

Example 2:
SELECT FirstName,LastNameFROM Person.Contact
TABLESAMPLE SYSTEM 
(1000 ROWS)

http://blog.sqlauthority.com/2007/05/27/sql-server-2005-limiting-result-sets-by-using-tablesample-examples/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: