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
What is 1nf 2nf and 3nf?
Is candidate a key?
List down some advantages of sql stored procedure?
How to use transact-sql statements to access the database engine?
What command must you use to include the not null constraint after a table has already been created?
How can you ensure that the database and sql server based application perform well?
How to download and install the scaled-down database adventureworkslt?
What are the five major components of a dbms?
What is the difference between delete and truncate statements?
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
How do I create an extended event in sql server?
How to list all user defined functions in the current database?
What command do we use to rename a db, a table and a column?
What is the difference between Clustered and Non-Clustered Index?
What is policy based management (pbm)? : sql server database administration