select Random rows in SQL Server

select top 10 cust_id,cust_name from members order by newid()

Will select top 10 rows from members by random

  • Meet Author

    S.Abhilash, started this blog in the later half of 2009 as a self hosting site for all his previous blogging attempts. , My way of writing and frequency of publishing may not be uniform as my resources are my projects nd issues i came across. For the last few years this blog is reacing 100 s of unique visitors each day, thanks wordpress and google for such a perfection in their software and services.

    Head to Authors Page | Abhilash on Facebook



Category Technology     Tags , , , , , , , , ,

Comment on Facebook

1 Comment to “select Random rows in SQL Server”

Community



FREE News Letter

Enter your email address

See Also

Resources

Please Submit your Email Address to Get Latest Technology News As it Happens


Enter your email address


Read previous post:
SQL Server Insert Row number in Query Resultset

Technique for displaying serial numbers in resultset with in an MS SQL Server query

Close