Some times for high volume of records we can not show all records to the user. But for example or case by case we need to show random records for SQL server Table. Here in this article I will show you how you can choose random records from a large result set.
Consider a Table like below:
Now we want to show Top 3 Random Records:
SELECT TOP 3 * FROM tblStock ORDER BY NEWID()
Note: You can apply condition or grouping in usual way.