469,609 Members | 1,666 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

how to retrieve random values from a database table

how to retrieve randomly rows from a sqlserver database table
Aug 18 '07 #1
1 1238
Hi,

Use TABLESAMPLE

Example.

SELECT FirstName, LastName
FROM Person.Contact
TABLESAMPLE (10 PERCENT) ;

OR

SELECT FirstName, LastName
FROM Person.Contact
TABLESAMPLE (10 ROWS) ;
Aug 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Thomas T. Thai | last post: by
4 posts views Thread by darrel | last post: by
5 posts views Thread by muskie | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.