|Oracle® Database SQL Language Reference
12c Release 1 (12.1)
|PDF · Mobi · ePub|
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
WITH value of 27.
The sequence must be in your own schema or you must have the
SEQUENCE system privilege.
Specify the schema containing the sequence. If you omit
schema, then Oracle Database assumes the sequence is in your own schema.
Specify the name of the sequence to be dropped.
Dropping 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
SEQUENCE system privilege:
DROP SEQUENCE oe.customers_seq;