Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

randomly select records

$
0
0

Hello,

I have a #TempTable with huge amount of data.  For example my table includes product_ID, ProductName, productLoc, User fields.  When I Select * From #TempTable I get about 10000 records.  I want be able to say I want get 5 randomly selected records for each user each time I run my select statement.  Any example?  Do very much appreciated.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>