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
What is use of except clause? How does it differ from not in clause?
what are different types of backups available in sql server? : Sql server database administration
Explain following error properties?
What are the different types of stored procedures?
Can binary strings be converted into numeric or float data types?
Can we delete data from a view?
What is the difference between clustered and non-clustered indexes in ms sql server?
what are user defined datatypes and when you should go for them? : Sql server database administration
Explain DBCC?
Can two tables share the same primary key?
What are the requirements to use odbc connections in php scripts?
How to use "if ... Else if ... Else ..." Statement structures in ms sql server?
When would you use sql joins?
What is the difference between DATETIME2 and DATETIME?
What is dbcc command in sql server?