Skip Headers
Oracle® Database SQL Language Reference
11g Release 2 (11.2)

Part Number E26088-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
SQLRF01804

DROP SEQUENCE

Purpose

Use the DROP SEQUENCE statement 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, then 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 a sequence

Prerequisites

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

Syntax

SQLRF54932drop_sequence::=

Description of drop_sequence.gif follows
Description of the illustration drop_sequence.gif

Semantics

SQLRF54933schema

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

SQLRF54934sequence_name

Specify the name of the sequence to be dropped.

Example

SQLRF54935Dropping a Sequence: Example The following statement drops the sequence customers_seq owned by the user oe, which was created in "Creating a Sequence: Example". To issue this statement, you must either be connected as user oe or have the DROP ANY SEQUENCE system privilege:

DROP SEQUENCE oe.customers_seq; 
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF