Purpose
This statement is used to drop a sequence.
Syntax
DROP SEQUENCE [IF EXISTS] [schema.]sequence_name
Parameters
Parameters |
Description |
|---|---|
| IF EXISTS | If the sequence does not exist, do not report an error; instead, provide a prompt message. Optional parameter. |
| schema | Specifies the user that contains the sequence. If not specified, Schema, the default is the sequence of the current logged-in user. This parameter is optional. |
| sequence_name | Specifies the name of the sequence to be deleted. |
Examples
- Drop the sequence
user_seq.
obclient> DROP SEQUENCE user_seq;
- Drop the sequence
product_seq. If it does not exist, no error is returned.
obclient> DROP SEQUENCE IF EXISTS product_seq;