how do we find every fifth record in a table

Answer Posted / shanmugam

with cte as(
select ROW_NUMBER() over (order by id) as serial,* from tablename
)
select * from cte where serial=5

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio

516


What are alternate keys?

565


you have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation? : Sql server administration

533


How to create function with parameter in sql server?

545


How to install sql server 2005 express edition?

585






What is a join in sql? What are the types of joins?

514


How to find the service pack installed? : sql server database administration

541


What is difference between inner join and full join?

540


How can we call UDF(User Define Function) using C# code in ASP.net ?

5920


How to find Duplicate Records In table?

579


What is dimension table? : sql server analysis services, ssas

554


What is parameterized reports in ssrs ?

105


How can I change procedure name in sql server?

529


IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do

1322


Why olap is used?

555