HomeMogDBMogDB StackUqbar
v1.1

Documentation:v1.1

Supported Versions:

DROP MATERIALIZED VIEW

Function

DROP MATERIALIZED VIEW forcibly deletes an existing materialized view from the database.

Precautions

Only the owner of a materialized view or a system administrator has the DROP MATERIALIZED VIEW permission.

Syntax

DROP MATERIALIZED VIEW [ IF EXISTS ] mv_name [, ...] [ CASCADE | RESTRICT ];

Parameter Description

  • IF EXISTS

    Reports a notice instead of an error if the specified materialized view does not exist.

  • mv_name

    Specifies the name of the materialized view to be deleted.

  • CASCADE | RESTRICT

    • CASCADE: automatically deletes the objects that depend on the materialized view.
    • RESTRICT: refuses to delete the materialized view if any objects depend on it. This is the default action.

Examples

-- Delete the materialized view named order_summary.
mogdb=# DROP MATERIALIZED VIEW order_summary;
Copyright © 2011-2024 www.enmotech.com All rights reserved.