How to select nth record from a table?

Answer Posted / roxy

select top 1 * from (select top n * from tbl order by col1
desc) tbl order by col1 asc

where n = nth number in the list

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the usage of floor function in sql server.

494


Explain what is row_number function?

546


What is field with example?

502


What is the difference between row_number and dense_rank?

431


What is optimistic concurrency?

551






What is relationship? What number of sorts of relationship are there?

621


What is sparse columns of sql server 2008?

591


Which are new data types introduced in sql server 2008?

590


How can we determine what objects a user-defined function depends upon?

510


Any one plz send me SQL Server Developer/DBA resume for 4 years experience

2164


What is the command to change the recovery model?

554


What is difference statement and preparedstatement?

535


How to create indexed view?

567


What were the latest updates to SQL Azure service?

92


Which operator do you use to return all of the rows from one query except rows are returned in a second query?

558