locked
How to use Offset . . .Fetch Next in SQL SERVER 2008 R2 RRS feed

  • Question

  • I get this error : "Incorrect syntax near 'OFFSET'.Invalid usage of the option NEXT in the FETCH statement." when I execute this SQL: 

    SELECT     ID, ItemID, ItemName, UnitCost, UnitPrice
    FROM         dbo.Inventory
    ORDER BY UnitCost OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY
    I am using SQL SERVER 2008 R2.

    Thursday, June 12, 2014 6:54 AM

Answers

All replies