srik780
SSChasing Mays
Points: 635
More actions
April 20, 2010 at 12:08 am
#219314
how to retive a every 5th record form a table
Paul White
SSC Guru
Points: 150467
April 20, 2010 at 12:15 am
#1154336
Already answered on your other thread:
http://www.sqlservercentral.com/Forums/Topic906477-391-1.aspx
Paul WhiteSQLPerformance.comSQLkiwi blog@SQL_Kiwi
Stefan_G
SSCertifiable
Points: 6609
April 21, 2010 at 2:26 am
#1155182
Something like this:
select * from (
select row_number() over (order by object_id) rownum, *
from sys.objects
) dt
where rownum%5=0
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply