How to select nth record from a table?
Answer Posted / ravinder pawar
Hi Frnds,
Pravin's logic is correct. I am just modifying it little
bit.
Select Top 1 *
From (Select Top 5 *
from HumanResources.Employee
order by EmployeeID desc)as temp
---Note If we don't use temp we'll get error as mentioned
below:
Incorrect syntax near ')'.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Explain primary key in sql server?
Mention the 3 ways to get a count of the number of records in a table.
Explain what is the difference between a local and a global temporary table?
What are sub reports and how to create them?
How can we improve performance by using SQL Server profiler?
Mention the different types of triggers?
Which table keeps information about stored procedures?
1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?
What do you understand by mirroring and mention the advantages of the mirroring?
Can you explain different types of locks in sql server?
Write an sql query to sort a table according to the amounts in a row and find the second largest amount.
Explain for xml explicit mode?
Explain what is cte (common table expression)?
What is difference between equi join and inner join?
explain how to create a new schema in a database? : Sql server database administration