Quantcast
Viewing all articles
Browse latest Browse all 35

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

Nothing fancy, no special functions, in case you use Caché like I do...

SELECT TOP 1 * FROM (  SELECT TOP n * FROM <table>  ORDER BY ID Desc)ORDER BY ID ASC

Given that you have an ID column or a datestamp column you can trust.


Viewing all articles
Browse latest Browse all 35

Trending Articles



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