DROP MATERIALIZED VIEW
Commands › Materialized views · Admins only, through sercha_define or a tenant file
Removes a materialized view and every stored version of its result.
Syntax
DROP MATERIALIZED VIEW [ IF EXISTS ] <name>
Parameters
| Parameter | Description |
|---|---|
<name> | A materialized view. |
IF EXISTS | Succeed with a message when there is no such materialized view. |
Usage notes
- A materialized view a view preset keeps cannot be dropped by hand. DETACH PRESET makes it the tenant's own first.
Examples
DROP MATERIALIZED VIEW IF EXISTS customer_totals
| result |
|---|
| materialized view "customer_totals" dropped |
Not supported
| Refused | Write instead |
|---|---|
DROP MATERIALIZED without VIEW | DROP MATERIALIZED VIEW <name> |
-- Refused by the engine
DROP MATERIALIZED customer_totals