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 primary key, unique key, and foreign key?
What is a unique key constraint?
Explain the difference between control flow and data flow?
Do you know what are acid properties of transaction?
How to convert a numeric expression from one data type to another?
Is a primary key unique?
Tell me what are the advantages of using stored procedures?
What is primary key and example?
Explain system rowset functions?
Define msdb database?
How to create a scrollable cursor with the scroll option?
How to modify existing triggers using "alter trigger"?
Explain what you mean by 3 tier architecture.
What are the basic functions for master, msdb, model, tempdb and resource databases?
What is the purpose of indexing?