Quantcast
Channel: Select n random rows from SQL Server table - Stack Overflow
Viewing all articles
Browse latest Browse all 20

Answer by Santosh Karanam for Select n random rows from SQL Server table

$
0
0
select  * from tablewhere id in (    select id from tableorder by random()limit ((select count(*) from table)*55/100))// to select 55 percent of rows randomly

Viewing all articles
Browse latest Browse all 20

Trending Articles



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