Sequence Functions
Sequence functions in TiDB are used to return or set values of sequence objects created using the CREATE SEQUENCE
statement.
Function name | Feature description |
---|---|
NEXTVAL() or NEXT VALUE FOR | Returns the next value of a sequence |
SETVAL() | Sets the current value of a sequence |
LASTVAL() | Returns the last used value of a sequence |
MySQL compatibility
MySQL does not support the functions and statements for creating and manipulating sequences as defined in ISO/IEC 9075-2.
Sequence Functionswas last updated 4/16/2024, 8:06:06 AM: Add docs for ALTER SEQUENCE and sequence functions (#16649) (#17208)