Databases
What Is a Sequence Generator? Issue Numbers Safely and Understand Gaps
A sequence generator is a database object that returns the next number according to configured rules each time it is called. It is often used for keys or reference numbers, but reserving a value and storing a row are separate operations. This makes a sequence more flexible than an identity column for multiple tables or pre-insert work, while gaps can be normal after rollbacks or caching.