SQL Server v.Next (Denali) : Deriving sets using SEQUENCE

Posted by AaronBertrand on SQL Blog See other posts from SQL Blog or by AaronBertrand
Published on Mon, 13 Dec 2010 12:58:00 GMT Indexed on 2010/12/13 13:12 UTC
Read the original article Hit count: 691

One complaint about SEQUENCE is that there is no simple construct such as NEXT (@n) VALUES FOR so that you could get a range of SEQUENCE values as a set. In a previous post about SEQUENCE , I mentioned that to get a range of rows from a sequence, you should use the system stored procedure sys.sp_sequence_get_range . There are some issues with this stored procedure: the parameter names are not easy to memorize; it requires multiple conversions to and from SQL_VARIANT; and, producing a set from the...(read more)

© SQL Blog or respective owner

Related posts about Denali

Related posts about sequence