Skip to main content

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​

ParameterDescription
<name>A materialized view.
IF EXISTSSucceed 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​

RefusedWrite instead
DROP MATERIALIZED without VIEWDROP MATERIALIZED VIEW <name>
-- Refused by the engine
DROP MATERIALIZED customer_totals

See also​

CREATE MATERIALIZED VIEW · DROP VIEW · SHOW