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
What is the impact on other user sessions when creating indexes?
What are trace flags and mention a few common trace flags used with sql server?
Describe and explain about SQL native client?
What are dml (data manipulation language) statements in ms sql server?
explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
Can we call stored procedure in view in sql server?
What is parameterized reports in ssrs ?
Can sql servers link to other servers?
Explain differentiate between a having clause and a where clause?
How to access the deleted record of an event?
what types of replication are supported in sql server? : Sql server database administration
Can you name some of the dml commands in sql?
What do you understand by replication in sql server?
What do you mean by SQL injection attack?
What are joins in sql and what are the different types of joins?