DROP SEQUENCE

DROP SEQUENCE — remove a sequence

Syntax

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

Description

Use the DROP SEQUENCE statement to remove a sequence from the database. You cannot drop a sequence that is defined as the sequence of a generated by identity table column (see Example 1). You can also use this statement to restart a sequence by dropping and then re-creating it.

A sequence that is created as an identity sequence for a table column when the table is created is automatically dropped when the table is dropped.

Parameters

Examples