Comment on page
DROP MATERIALIZED VIEW
This command drops the specified materialized view and deletes its data.
Note that if there are existing jobs that are dependent upon the materialized view in question, then it cannot be dropped.
DROP MATERIALIZED VIEW [ IF EXISTS ] <mv_identifier>
[ COMPUTE_CLUSTER = <cluster_identifier> ];
Default: The sole cluster in your environment
(Optional) The cluster that processes the deletion.
This option can only be omitted when there is just one cluster in your environment.
When you have more than one compute cluster, you are required to provide which one to use through this option.
(Optional) To prevent the Upsolver query engine from returning an error if the materialized view does not exist, include
IF EXISTSin your
DROPstatement; instead, you will see the message Operation resulted in no change.
The following example runs a
IF EXISTSto drop the materialized view, sales_data_totals. By including
IF EXISTS, an error is not encountered if the materialized view does not exist. Otherwise, if the materialized view exists, it will be dropped from the organization:
DROP MATERIALIZED VIEW IF EXISTS "sales_data_totals";