This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-14. For the latest, interactive version please visit https://mariadb.com/kb/.

Information Schema SEQUENCES Table

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.

ColumnDescription
SEQUENCE_CATALOGCatalog name
SEQUENCE_SCHEMADatabase name
SEQUENCE_NAMESequence name
DATA_TYPEData type, for example BIGINT or TINYINT UNSIGNED
NUMERIC_PRECISION
NUMERIC_PRECISION_RADIX
NUMERIC_SCALE
START_VALUE
MINIMUM_VALUE
MAXIMUM_VALUE
INCREMENT
CYCLE_OPTION1 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

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.