Pagination is a regular technique used for developing web applications. There are numerous methods of implementing pagination . Below, I'm creating a list of methods that will allow both a SQL Server developer and web developer.
Method 1
/**Replace X & y with relevant numbers
**/
SELECT * FROM (
SELECT TOP x * FROM (
SELECT TOP y fields
FROM table
WHERE conditions
ORDER BY table.field ASC) as foo
ORDER by field DESC) as bar
ORDER by field ASC
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |