I\'m working on a small project in which I\'ll need to select a record from a temporary table based on the actual row number of the record.
How can I select a record
If using SQL Server 2012 you can now use offset/fetch:
declare @rowIndexToFetch int set @rowIndexToFetch = 0 select * from dbo.EntityA ea order by ea.Id offset @rowIndexToFetch rows fetch next 1 rows only