Oracle7 Server SQL Reference
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:
- If the sequence's creation label is higher than your DBMS label, you must have READUP and WRITEUP system privileges
- If the sequence's creation label is lower than your DBMS label, you must have WRITEDOWN system privilege.
- If the sequence's creation label and your DBMS label are not comparable, you must have READUP, WRITEUP, and WRITEDOWN system privileges.
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:
2. Create it with the same name and a START WITH value of 27.
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