Quantcast
Channel: How to select the nth row in a SQL database table? - Stack Overflow
Viewing all articles
Browse latest Browse all 35

Answer by Mashood Murtaza for How to select the nth row in a SQL database table?

$
0
0

Most suitable answer I have seen on this article for sql server

WITH myTableWithRows AS (    SELECT (ROW_NUMBER() OVER (ORDER BY myTable.SomeField)) as row,*    FROM myTable)SELECT * FROM myTableWithRows WHERE row = 3

Viewing all articles
Browse latest Browse all 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>