Skip to main content

DROP SEQUENCE

Description

This statement is used to drop a sequence.

Syntax

DROP SEQUENCE  [IF EXISTS] [schema. ] sequence_name;

Parameters

ParameterDescription
schema.The user who owns the sequence. If you do not specify Schema, the sequence of the current user is dropped.
IF EXISTSIf the sequence does not exist, do not return an error but provide an informational message.
sequence_nameThe name of the sequence to be dropped.

Examples

Drop the sequence seq1.

DROP SEQUENCE IF EXISTS seq1;
Query OK, 0 rows affected (0.001 sec)