Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.09 KB

sql-statement-drop-sequence.md

File metadata and controls

56 lines (38 loc) · 1.09 KB
title summary aliases
DROP SEQUENCE
An overview of the usage of DROP SEQUENCE for the TiDB database.
/docs/dev/sql-statements/sql-statement-drop-sequence/
/docs/dev/reference/sql/statements/drop-sequence/

DROP SEQUENCE

The DROP SEQUENCE statement drops the sequence object in TiDB.

Synopsis

DropSequenceStmt ::=
    'DROP' 'SEQUENCE' IfExists TableNameList

IfExists ::= ( 'IF' 'EXISTS' )?

TableNameList ::=
    TableName ( ',' TableName )*

TableName ::=
    Identifier ('.' Identifier)?

Examples

{{< copyable "sql" >}}

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

{{< copyable "sql" >}}

DROP SEQUENCE seq, seq2;
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