DROP SEQUENCE deletes a sequence from the current database.
Only a sequence owner or a system administrator can delete a sequence.
1 | DROP SEQUENCE [ IF EXISTS ] {[schema.]sequence_name} [ , ... ] [ CASCADE | RESTRICT ]; |
Sends a notice instead of an error if the specified sequence does not exist.
Specifies the name of the sequence.
Automatically deletes objects that depend on the sequence to be deleted.
Refuses to delete the sequence if any objects depend on it. This is the default.
Delete the sequence.
1 | DROP SEQUENCE serial; |