DROP SEQUENCE

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

语法图

DropSequenceStmt

DROP SEQUENCE - 图1

IfExists

DROP SEQUENCE - 图2

TableNameList

DROP SEQUENCE - 图3

TableName

DROP SEQUENCE - 图4

  1. DropSequenceStmt ::=
  2. 'DROP' 'SEQUENCE' IfExists TableNameList
  3. IfExists ::= ( 'IF' 'EXISTS' )?
  4. TableNameList ::=
  5. TableName ( ',' TableName )*
  6. TableName ::=
  7. Identifier ('.' Identifier)?

示例

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

MySQL 兼容性

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

另请参阅