title: SHOW CREATE SEQUENCE summary: TiDB 数据库中 SHOW CREATE SEQUENCE 的使用概况。

SHOW CREATE SEQUENCE

SHOW CREATE SEQUENCE 语句用于查看一个序列的详细信息,类似于 SHOW CREATE TABLE 语句。

语法图

ShowCreateSequenceStmt:

ShowCreateSequenceStmt

TableName:

TableName

示例

  1. CREATE SEQUENCE seq;
  1. Query OK, 0 rows affected (0.03 sec)
  1. SHOW CREATE SEQUENCE seq;
  1. +-------+----------------------------------------------------------------------------------------------------------------------------+
  2. | Table | Create Table |
  3. +-------+----------------------------------------------------------------------------------------------------------------------------+
  4. | seq | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB |
  5. +-------+----------------------------------------------------------------------------------------------------------------------------+
  6. 1 row in set (0.00 sec)

MySQL 兼容性

该语句是 TiDB 的扩展,序列的实现借鉴自 MariaDB。

另请参阅