Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

DROP SEQUENCE

Use the DROP SEQUENCE statement to remove a sequence from the database.

Only Dynamic Server supports this statement, which is an extension to the ANSI/ISO standard for SQL.

Syntax

Read syntax diagramSkip visual syntax diagram>>-DROP SEQUENCE--+------------+--sequence---------------------><
                  '- owner-- .-'
 
Element Description Restrictions Syntax
owner Name of sequence owner Must own the sequence object Owner Name
sequence Name of a sequence Must exist in the current database Identifier

Usage

This statement removes the sequence entry from the syssequences system catalog table. To drop a sequence, you must be its owner or have the DBA privilege on the database. In an ANSI-compliant database, you must qualify the name of the sequence with the name of its owner (owner.sequence) if you are not the owner.

If you drop a sequence, any synonyms for the name of the sequence are also dropped automatically by the database server.

You cannot use a synonym to specify the identifier of the sequence in the DROP SEQUENCE statement.

Related Information

Related statements: ALTER SEQUENCE, CREATE SEQUENCE, RENAME SEQUENCE, GRANT, REVOKE, INSERT , UPDATE , and SELECT

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]