DROP SEQUENCE

The DROP SEQUENCE statement drops the sequence object in TiDB.

Synopsis

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)?

Examples

  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 compatibility

This statement is a TiDB extension. The implementation is modeled on sequences available in MariaDB.

See also