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 are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?
While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?
How to create a simple table to test triggers in ms sql server?
How to use subqueries in the from clause in ms sql server?
on line cluster can we make if yes tell me the procedure
What do you mean by subquery?
Define outer join in sql server joins?
Explain the first normal form(1nf)?
Is foreign key a primary key?
What is similarity and difference between truncate and delete in sql?
What is a partitioned view?
What is the difference between createstatement and preparedstatement?
Differentiate between truncate vs delete in mssql?
What is difference between clustered and non clustered index?
What is a fill factor?