I\'m interested in learning some (ideally) database agnostic ways of selecting the nth row from a database table. It would also be interesting to see how this can b
SQL SERVER
Select n' th record from top
SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() OVER(ORDER BY ID) AS ROW FROM TABLE ) AS TMP WHERE ROW = n
select n' th record from bottom
SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() OVER(ORDER BY ID DESC) AS ROW FROM TABLE ) AS TMP WHERE ROW = n