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 user5085719 for How to select the nth row in a SQL database table?

$
0
0

This is how I'd do it within DB2 SQL, I believe the RRN (relative record number) is stored within the table by the O/S;

SELECT * FROM (                           SELECT RRN(FOO) AS RRN, FOO.*   FROM FOO                            ORDER BY RRN(FOO)) BAR              WHERE BAR.RRN = recordnumber

Viewing all articles
Browse latest Browse all 35

Trending Articles



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