A database sequence is a number generator that produces unique numbers in a scalable and concurrency safe way.
A database sequence is a number generator that produces unique numbers in a scalable and concurrency safe way.
Once a sequence value has been generated, this number is never re-used (unless a sequence is defined to have a maximum value and cycle through its possible range).
Sequence values are not guaranteed to be gapless but offer a scalable and fast way to generate unique numbers even in high concurrency situations.
Sequences are supported by nearly all modern DBMS. However, the syntax to create them and to obtain a number from them differs between the DBMS products.