The DROP SEQUENCEstatement removes a sequence from a database.
This statement performs a schema change. For more information about how online schema changes work in CockroachDB, see Online Schema Changes.
The user must have the DROPprivilege on the specified sequence(s).
Parameter | Description
`IF EXISTS` | Drop the sequence only if it exists; if it does not exist, do not return an error.
`sequence_name` | The name of the sequence you want to drop. 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 [constraints](constraints.html) and tables) use it.
`CASCADE` | Not yet implemented. Currently, you can only drop a sequence if nothing depends on it.
### Remove a sequence (no dependencies)
In this example, other objects do not depend on the sequence being dropped.
sequence_schema | sequence_name
public | even_numbers