Skip to main content
DROP MATERIALIZED VIEW drops a materialized view. You cannot drop a synchronous materialized view that is being created in process with this command unless you use the FORCE option. With FORCE, the database cancels any stuck sync MV build jobs, restores the base table state to NORMAL, and then drops the materialized view. Without FORCE, see Synchronous materialized View - Drop an unfinished materialized view for further instructions. Tip This operation requires the DROP privilege on the target materialized view.

Syntax

Parameters in brackets [] are optional.

Parameters

Examples

Example 1: Drop an existing materialized view
  1. View all existing materialized views in the database.
  1. Drop the materialized view order_mv1.
  1. Check if the dropped materialized view exists.
Example 2: Drop a non-existing materialized view
  • If the parameter IF EXISTS is specified, the database will not throw an exception when deleting a materialized view that does not exist.
  • If the parameter IF EXISTS is not specified, the system will throw an exception when deleting a materialized view that does not exist.