AskKrishna
Search This Blog
November 13, 2014
How to retreive random number of rows from a table
USE THE TABLESAMPLE KEYWORD AFTER THE TABLE NAME.
Following queries retrieve random number of rows each time
SELECT * FROM TABLE_NAME TABLESAMPLE(100 ROWS)
SELECT * FROM TABLE_NAME TABLESAMPLE(10 PERCENT)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment