Oracle7 Server SQL Reference

Contents Index Home Previous Next

DROP SEQUENCE

Purpose

To remove a sequence from the database.

Prerequisites

The sequence must be in your own schema or you must have DROP ANY SEQUENCE system privilege.

If you are using Trusted Oracle7 in DBMS MAC mode, your DBMS label must match the sequence's creation label or you must satisfy one of the following criteria:

Syntax

Keywords and Parameters

schema

is the schema containing the sequence. If you omit schema, Oracle7 assumes the sequence is in your own schema.

sequence

is the name of the sequence to be dropped.

Usage Notes

One method for restarting a sequence is to drop and recreate it. For example, if you have a sequence with a current value of 150 and you would like to restart the sequence with a value of 27, you would:

Example

The following statement drops the sequence ESEQ owned by the user ELLY:

DROP SEQUENCE elly.eseq 

To issue the above statement, you must either be connected as the user ELLY or have DROP ANY SEQUENCE system privilege.

Related Topics

ALTER SEQUENCE command [*] CREATE SEQUENCE command [*]


Contents Index Home Previous Next