O'Reilly logo

Microsoft SQL Server 2012 Internals by Bob Beauchemin Kalen Delaney Conor Cunningham, Jonathan Kehayias, Benjamin Nevarez, and Paul S. Randal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required