Returning Only Those Records on Page N
I am constructing a web-based application that displays search results one
page (say 20 records) at a time. The data resides in SQL Server 7.0.
Rather than returning all records meeting the query conditions to the application
tier, I would like to return only those for a specific page. For example,
if I pass in a page number parameter of 5, I would get back just records
81-100. I realize I could specify TOP 100 and then discard the first 80 in
my application tier, but I don't want that performance hit when the page
number gets higher.
Is there an efficient, scalable approach for doing this in a stored procedure
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL