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 standby servers? Explain types of standby servers.
What is sql server replication? : sql server replication
Why would you call update statistics?
What is ddl and dml commands?
What is the tcp/ip port on which sql server runs?
Where the sql logs gets stored? : sql server database administration
Define indexes?
How to insert stored procedure result into temporary table?
What are the differences between stored procedure and the dynamic sql?
Can two tables share a primary key?
What is the main difference between ‘between’ and ‘in’ condition operators?
What are the operating modes in which database mirroring runs?
What is simple indexing method?
How do you send email on SQL Server?
Explain about SQLOS?