Information Schema SEQUENCES Table
You are viewing an old version of this article. View
the current version here.
MariaDB starting with 11.5
The Information Schema SEQUENCES
table stores information about sequences on the server.
It contains the following columns. See CREATE SEQUENCE for details.
Column | Description |
---|---|
SEQUENCE_CATALOG | Catalog name |
SEQUENCE_SCHEMA | Database name |
SEQUENCE_NAME | Sequence name |
DATA_TYPE | Data type, for example BIGINT or TINYINT UNSIGNED |
NUMERIC_PRECISION | |
NUMERIC_PRECISION_RADIX | |
NUMERIC_SCALE | |
START_VALUE | |
MINIMUM_VALUE | |
MAXIMUM_VALUE | |
INCREMENT | |
CYCLE_OPTION | 1 if the CYCLE OPTION is set, otherwise 0 |
Example
CREATE SEQUENCE s START WITH 100 INCREMENT BY 10; SELECT * FROM INFORMATION_SCHEMA.SEQUENCES\G *************************** 1. row *************************** SEQUENCE_CATALOG: def SEQUENCE_SCHEMA: test SEQUENCE_NAME: s DATA_TYPE: bigint NUMERIC_PRECISION: 64 NUMERIC_PRECISION_RADIX: 2 NUMERIC_SCALE: 0 START_VALUE: 100 MINIMUM_VALUE: 1 MAXIMUM_VALUE: 9223372036854775806 INCREMENT: 10 CYCLE_OPTION: 0
See Also
- CREATE SEQUENCE
- ALTER SEQUENCE
- DROP SEQUENCE
- NEXT VALUE FOR
- PREVIOUS VALUE FOR
- SETVAL(). Set next value for the sequence.
- AUTO INCREMENT
- Sequence Storage Engine
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.