DROP SEQUENCE

Name

DROP SEQUENCE  --  Removes an existing sequence from a database.

Synopsis

DROP SEQUENCE name [, ...]
  

Parameters

name

The sole parameter of this command is the name of the sequence you wish to move.

Results

DROP

This message is displayed if the sequence is successfully dropped.

ERROR: sequence "name" does not exist.

This error is displayed if the specified sequence does not exist.

Description

Use the DROP SEQUENCE command to remove a sequence number generator from a database. Presently, sequences are stored as tables in PostgreSQL; because of this, dropping a sequence is the same as dropping a table.

Examples

The following example removes a sequence named seq_emp that was previously created.

DROP SEQUENCE seq_emp;