Making sense of 'OFFSET/FETCH' in SSMS 2012
问题 Just installed Microsoft SQL Server Management Studio 2012 today. In familiarizing myself with the pagination feature addition of ORDER BY, I keep running into this error: Msg 102, Level 15, State 1, Line 5 Incorrect syntax near 'OFFSET'. Msg 153, Level 15, State 2, Line 6 Invalid usage of the option NEXT in the FETCH statement. Here is my query: SELECT SingleWomansName, NumberOfCats FROM CatLadies WHERE NumberOfCats > 1 ORDER BY NumberOfCats OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY I've seen