Is there a way to select the next 4 items in a sql query. I have a sql query populating an asp repeater and its using a "select top 4 from ....." sql query. I want a button to select the next 4 from the database. Is this possible? Thanks all.
SELECT ID, Foo, Bar
FROM (SELECT ROW_NUMBER() OVER (ORDER BY ID ASC) AS Row,
ID, Foo, Bar
FROM SomeTable) tmp
WHERE Row >= @RowRangeStart AND Row <= @RowRangeEnd
retrieve specific range of rows in a SQL Server table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With