DROP SEQUENCE removes a sequence from a database.
The “ statement performs a schema change. For more information about how online schema changes work in CockroachDB, see .
Required privileges
The user must have theDROP on the specified sequence(s).
Synopsis
Parameters
| Parameter | Description |
|---|---|
IF EXISTS | Drop the sequence only if it exists; if it does not exist, do not return an error. |
sequence_name_list | A comma-separated list of sequence names. Find the sequence name with SHOW CREATE on the table that uses the sequence. |
RESTRICT | (Default) Do not drop the sequence if any objects (such as and tables) use it. |
CASCADE | Not implemented. You can drop a sequence only if nothing depends on it. |

