SQL Server 2012: SEQUENCE Feature RTM restrictions and update

Hi Friends,

I had written a series of blog posts on the SEQUENCE feature in DENALI (now SQL Server 2012). You can browse them here:




Now that the RTM is out, I have observed a couple of restrictions, some of them that worked in DENALI CTPs; primarily with the NEXT VALUE FOR function. Here is the update:

The NEXT VALUE FOR function will not work with any of these operators:

•             DISTINCT


•             UNION / UNION ALL

•             EXCEPT

•             INTERSECT

•             TOP

•             OFFSET

It will also not work with the following conditional expressions:

•             CASE

•             CHOOSE

•             COALESCE

•             IIF

•             ISNULL

•             NULLIF

Please refer Books Online for latest updates before you try out the scripts from any of my blogs posts.

Comments are welcome.




About Amit Bansal

Amit Bansal is always brainstorming around SQL Server. Despite working with SQL since 1997, he is amazed that he keeps learning new things every single day. SQL Server is AB's first love, and his wife does not mind that. He tries to share as much and spreads the SQL goodness. Internals and Performance Tuning excites him, and also gives him sleepless nights at times, simply because he is not a genius, but quite a hard worker and does not give up. It has been a long and exciting journey since 1997, you can read here: http://sqlmaestros.com/amit-bansal/ He is on Twitter: https://www.twitter.com/A_Bansal

View all posts by Amit Bansal →

Leave a Reply

Your email address will not be published.