> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DROP SEQUENCE

The `DROP SEQUENCE` [statement](/docs/stable/sql-statements.md) removes a sequence from a database.

> [!NOTE]
>
> The `DROP SEQUENCE` statement performs a schema change. For more information about how online schema changes work in CockroachDB, see [Online Schema Changes](/docs/stable/online-schema-changes.md).

## Required privileges

The user must have the `DROP` [privilege](/docs/stable/security-reference/authorization.md#managing-privileges) on the specified sequence(s).

## Synopsis

![drop\_sequence syntax diagram](https://mintcdn.com/cockroachlabs/UZNSFbmU2EwEm6G5/images/sql-diagrams/common/drop_sequence.svg?fit=max\&auto=format\&n=UZNSFbmU2EwEm6G5\&q=85\&s=35230c858229b3b0b86630b88416eea5)

## 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 [constraints](/docs/stable/constraints.md) and tables) use it. |
| `CASCADE` | Not implemented. You can drop a sequence only if nothing depends on it. |

## Examples

### Remove a sequence (no dependencies)

In this example, other objects do not depend on the sequence being dropped.

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> CREATE SEQUENCE even_numbers INCREMENT 2 START 2;
```

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW SEQUENCES;
```

```
  sequence_schema | sequence_name
------------------+----------------
  public          | even_numbers
(1 row)
```

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> DROP SEQUENCE even_numbers;
```

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW SEQUENCES;
```

```
  sequence_schema | sequence_name
------------------+----------------
(0 rows)
```

## See also

* [`CREATE SEQUENCE`](/docs/stable/create-sequence)
* [`ALTER SEQUENCE`](/docs/stable/alter-sequence)
* [`SHOW SEQUENCES`](/docs/stable/show-sequences)
* [Functions and Operators](/docs/stable/functions-and-operators.md)
* [SQL Statements](/docs/stable/sql-statements.md)
* [Online Schema Changes](/docs/stable/online-schema-changes.md)
