how do we find every fifth record in a table

Answer Posted / santhi k

Using Top N analysis....


select * from (select rownum rn, col1,col2,col3 from
tablename) where mod(rn,5)=0;

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between inner join and full join?

554


How to scale out a federation by Sql statement?

92


What are the filtered indexes?

605


What is difference between foreign key and unique key?

554


What do you need to connect php to sql server?

545






What is a hint?

583


Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

1306


What is built-in/administrator?

580


Is INSTEAD OF trigger directly applicable to Table ?

576


Explain the concepts and capabilities of sql server?

547


How can you check the version of sql server?

565


What is collation?

716


What is reportserver and reportservertempdb ?

107


What is coalesce and check constraint in sql server?

552


How to find out what is the default collation in a database?

634