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 attribute? : sql server analysis services, ssas

581


What is the difference between mysql and mysqli?

581


How to create a local temporary stored procedure?

495


Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...

1567


What is difference between index seek vs. Index scan?

616






What does the not null constraint do?

573


what is the difference between delete table and truncate table commands? : Sql server database administration

517


How to list all user defined functions in the current database?

512


What is sql server english query?

537


What is sleeping status in sql server?

516


1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?

1530


What is msdb database? : SQL Server Architecture

530


what are the types of indexes? : Sql server database administration

591


Define outer join in sql server joins?

519


What is the use of group by clause?

521