Oracle8i SQL Reference
Release 2 (8.1.6)

A76989-01

Library

Product

Contents

Index

Prev Up Next

SQL Statements (continued), 19 of 30


DROP SEQUENCE

Syntax


Purpose

To remove a sequence from the database.

You can also use this statement to restart a sequence by dropping and then re-creating 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 can drop the sequence and then re-create it with the same name and a START WITH value of 27.

See Also:

"CREATE SEQUENCE" and "ALTER SEQUENCE" for more information on creating and modifying sequences. 

Prerequisites

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

Keywords and Parameters

schema 

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

sequence_name 

is the name of the sequence to be dropped.  

Example

The following statement drops the sequence ESEQ owned by the user ELLY. To issue this statement, you must either be connected as user ELLY or have DROP ANY SEQUENCE system privilege:

DROP SEQUENCE elly.eseq; 

Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index