How to select nth record from a table?

Answer Posted / rathika

Answer #7 should be

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

where n = nth number in the list

Is This Answer Correct ?    8 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are null values the same as that of zero or a blank space?

567


What is the difference between an index and a unique index?

540


List out different types of normalizations in sql server and explain each of them?

545


What is temporal data type?

516


Can sql servers link to other servers?

552






What are the different types of sql server replication? : sql server replication

616


How to create a ddl trigger using "create trigger" statements?

608


Why use “in” clause in sql server?

548


Give an example of SQL injection attack ?

564


What are the advantages of using stored procedures in sql server?

504


What functions can a view be used to performed?

609


What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

555


Explain a differential backup?

566


How to access the inserted record of an event?

566


What are the three different part of rdl file explain them?

168