DROP SEQUENCE statement

The DROP SEQUENCE statement removes a sequence generator that was created using a CREATE SEQUENCE statement.

Syntax

DROP SEQUENCE [ schemaName. ] SQL92Identifier RESTRICT

The sequence name is composed of an optional schemaName and a SQL92Identifier. If a schemaName is not provided, the current schema is the default schema. If a qualified sequence name is specified, the schema name cannot begin with SYS.

The RESTRICT keyword is required. If a trigger or view references the sequence generator, Derby throws an exception.

Dropping a sequence generator implicitly drops all USAGE privileges that reference it.

Example

DROP SEQUENCE order_id RESTRICT;
Related reference
DROP FUNCTION statement
DROP INDEX statement
DROP PROCEDURE statement
DROP ROLE statement
DROP SCHEMA statement
DROP SYNONYM statement
DROP TABLE statement
DROP TRIGGER statement
DROP TYPE statement
DROP VIEW statement