How to select only row 5 to 19 or row 20 to 299 from a table?
Posted on 2003-03-02
I know you can, quite easily, select the TOP 15 or 20 or 300 rows of a table, but is there a way to select 16-19? or 21-299?
I need it to fill a listview only with as many elements as the listview can display at once, and when the user scrolls up or down I want to fill the listview with the next n elements.
The table I need to show consists of hundreds of thousands of rows and to return all rows would be a performance nightmare.
Can you provide a sample code of how it could be done using a stored procedure?
Thanks in advance,