# DROP INDEX
DROP INDEX removes an index

> For the complete documentation index, see [llms.txt](https://preview.materialize.com/materialize/40094/llms.txt).


`DROP INDEX` removes an index from Materialize.

## Syntax

```mzsql
DROP INDEX [IF EXISTS] <index_name> [CASCADE|RESTRICT];
```

Syntax element | Description
---------------|------------
**IF EXISTS** | Optional. If specified, do not return an error if the specified index does not exist.
`<index_name>` | Index to drop.
**CASCADE** | Optional. If specified, remove the index and its dependent objects.
**RESTRICT** | Optional. Remove the index. _(Default.)_

> **Note:** Since indexes do not have dependent objects, `DROP INDEX`, `DROP INDEX
> RESTRICT`, and `DROP INDEX CASCADE` are equivalent.


## Privileges

To execute the `DROP INDEX` statement, you need:

- Ownership of the dropped index.
- `USAGE` privileges on the containing schema.

## Examples

### Remove an index

> **Tip:** In the **Materialize Console**, you can view existing indexes in the [**Database
> object explorer**](https://preview.materialize.com/materialize/40094/markdown-docs/developer-tools/console/data/index.md). Alternatively, you can use the
> [`SHOW INDEXES`](https://preview.materialize.com/materialize/40094/markdown-docs/sql/show-indexes/index.md) command.


Using the  `DROP INDEX` commands, the following example drops an index named `q01_geo_idx`.

```mzsql
DROP INDEX q01_geo_idx;
```

If the index `q01_geo_idx` does not exist, the above operation returns an error.

### Remove an index without erroring if the index does not exist

You can specify the `IF EXISTS` option so that the `DROP INDEX` command does
not return an error if the index to drop does not exist.

```mzsql
DROP INDEX IF EXISTS q01_geo_idx;
```

## Related pages

- [`CREATE INDEX`](https://preview.materialize.com/materialize/40094/markdown-docs/sql/create-index/index.md)
- [`SHOW VIEWS`](https://preview.materialize.com/materialize/40094/markdown-docs/sql/show-views/index.md)
- [`SHOW INDEXES`](https://preview.materialize.com/materialize/40094/markdown-docs/sql/show-indexes/index.md)
- [`DROP OWNED`](https://preview.materialize.com/materialize/40094/markdown-docs/sql/drop-owned/index.md)
