DROP SEQUENCE

DROP SEQUENCE 语句用于删除序列对象。

语法图

DropSequenceStmt:

DropSequenceStmt

OptTemporary:

OptTemporary

IfExists:

IfExists

TableNameList:

TableNameList

示例

DROP SEQUENCE seq;
Query OK, 0 rows affected (0.10 sec)
DROP SEQUENCE seq, seq2;
Query OK, 0 rows affected (0.03 sec)

MySQL 兼容性

MySQL 暂无序列选项。TiDB 序列借鉴自 MariaDB。SETVAL 函数的步调是 TiDB 特有的,其他函数的步调与 MariaDB 保持一致。

另请参阅