> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-vortex-format.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Documentation for ALTER TABLE ... DELETE Statement

# ALTER TABLE ... DELETE Statement

```sql theme={null}
ALTER TABLE [db.]table [ON CLUSTER cluster] DELETE WHERE filter_expr
```

Deletes data matching the specified filtering expression. Implemented as a [mutation](/reference/statements/alter/index#mutations).

<Warning>
  The `ALTER TABLE` prefix signals that this is a heavyweight operation, unlike similar queries in OLTP databases. `ALTER TABLE ... DELETE` rewrites every data part containing rows that match the filtering expression, generating substantial write I/O. Use it sparingly, as it can affect `SELECT` performance.

  For `MergeTree` tables, consider using the [`DELETE FROM` query](/reference/statements/delete), which performs a lightweight delete and can be considerably faster. For workloads that require frequent deletions or corrections, consider using [`ReplacingMergeTree`](/concepts/features/operations/update/replacing-merge-tree) or [`CollapsingMergeTree`](/reference/engines/table-engines/mergetree-family/collapsingmergetree).
</Warning>

The `filter_expr` must be of type `UInt8`. The query deletes rows in the table for which this expression takes a non-zero value.

One query can contain several commands separated by commas.

The synchronicity of the query processing is defined by the [mutations\_sync](/reference/settings/session-settings/mutations#mutations_sync) setting. By default, it is asynchronous.

**See also**

* [Mutations](/reference/statements/alter/index#mutations)
* [Synchronicity of ALTER Queries](/reference/statements/alter/index#synchronicity-of-alter-queries)
* [mutations\_sync](/reference/settings/session-settings/mutations#mutations_sync) setting

<h2 id="related-content">
  Related content
</h2>

* Blog: [Handling Updates and Deletes in ClickHouse](https://clickhouse.com/blog/handling-updates-and-deletes-in-clickhouse)
