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 Vol. 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.