Chapter 22. SQL Server Denali: what’s coming next in T-SQL

Sergio Govoni

Last November when I was in Seattle for the PASS Summit 2010, Microsoft announced the first public Community Technology Preview (CTP1) of Microsoft SQL Server, code-named “Denali.” In this chapter, I’ll talk about some new features of the T-SQL language:

  • OFFSET and FETCH
  • SEQUENCE
  • EXECUTE ... WITH RESULT SETS
  • THROW

OFFSET and FETCH

The ORDER BY clause, used to sort the query result set, has two interesting options in Denali that allow you to simplify the ad hoc paging of a query result set: OFFSET and FETCH. In the following scenario, you can see typical examples.

Here’s the OFFSET option:

OFFSET {integer_constant | offset_row_count_expression} {ROW | ROWS}

This ...

Get SQL Server MVP Deep Dives, Volume 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.