Limit what?

Posted on: September 28, 2010 Posted by: John Huh Comments: 0

Limit what?

How do you start at a certain row and limit it? Used for paging perhaps, but here it is how:

[sourcecode language=”sql”]
SELECT Description, Date
FROM (SELECT ROW_NUMBER() OVER (ORDER BY Date DESC)
AS Row, Description, Date FROM LOG)
AS LogWithRowNumbers
WHERE Row >= 11 AND Row <= 20
[/sourcecode]

Leave a Reply:

Your email address will not be published. Required fields are marked *