database sequence

A database object that hands out increasing numbers, typically used to create new row IDs.

In more detail

Sequences are not rolled back with a transaction, so tests that assert exact IDs need the sequence reset or should not depend on the number at all. Reset sequences deliberately in database test fixtures, just like time-dependent data.

Related terms

Taught in

References