Sequence object

SQL Server 2012 introduces an alternative to the IDENTITY property that lets you share an incremental sequence of values across multiple tables. A sequence can be created on any connection, and then that connection or any other can generate the next available value in the sequence by referencing NEXT VALUE FOR the sequence object. Every time NEXT VALUE FOR the sequence object is referenced, the next value is in the sequence is returned.

A SEQUENCE is an object with a specific name in a specific schema, with the following properties.

  • Datatype. The data type can be any integer type, which includes tinyint, smallint, int, bigint, decimal, or numeric with a scale of 0 and any user-defined type that is based on one of the integer types. ...

Get Microsoft SQL Server 2012 Internals 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.