1

I recall that SQL Server (maybe version 2014 but it could be 2016) added the ability to create database level counters (identity field?). Sort of like an IDENTITY function at the database level. I don't recall what they called these counters so am having trouble finding them in the help.

What are these counters called and how do I create one?

Note that I am not talking about creating a table with an identity column and rolling a scalar valued function to return it. I am referring to a build-in feature but I can't recall what it is named.

1
  • There's also the old timestamp type as well (although not a numerical value)
    – Nic
    Mar 8, 2017 at 20:42

1 Answer 1

2

Sounds like Sequences, brought in with SQL 2012

Info:
https://msdn.microsoft.com/en-us/library/ff878058.aspx
Create Sequence syntax:
https://msdn.microsoft.com/en-us/library/ff878091.aspx
Nice SimpleTalk article on them:
https://www.simple-talk.com/sql/learn-sql-server/sql-server-sequence-basics/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.