Monday, January 30, 2012

SQL Server 2012 (Denali): OFFSET and FETCH Limitations

OFFSET and FETCH can be used in any query that allows TOP and ORDER BY with the following limitations:
  1. The OVER clause does not support OFFSET and FETCH.
  2. OFFSET and FETCH cannot be specified directly in INSERT, UPDATE, MERGE, and DELETE statements, but can be specified in a subquery defined in these statements. For example, in the INSERT INTO SELECT statement, OFFSET and FETCH can be specified in the SELECT statement.
  3. In a query that uses UNION, EXCEPT or INTERSECT operators, OFFSET and FETCH can only be specified in the final query that specifies the order of the query results.
  4. TOP cannot be combined with OFFSET and FETCH in the same query expression (in the same query scope).

No comments:

Post a Comment