Skip Headers

Oracle9i SQL Reference
Release 2 (9.2)

Part Number A96540-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

SQL Statements: DROP SEQUENCE to ROLLBACK, 2 of 19


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:

Prerequisites

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

Syntax

drop_sequence::=

Text description of statements_94.gif follows
Text description of drop_sequence


Keywords and Parameters

schema

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

sequence_name

Specify the name of the sequence to be dropped.

Example

Dropping a Sequence: Example

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

DROP SEQUENCE oe.customers_seq; 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback