Saturday, July 3, 2010

How to Select Random Records from a Table

Use the following T-SQL to fetch the Random Records from a Table

SELECT TOP 1 * FROM TABLE ORDER BY NEWID()

No comments: