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.
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.