Removes a materialized view from the database.
DROP MATERIALIZED VIEW [ IF EXISTS ] [ owner.]materialized-view-name
All data in the table is automatically deleted as part of the dropping process. All indexes and keys for the materialized view are dropped as well.
Use the IF EXISTS clause if you do not want an error returned when the DROP MATERIALIZED VIEW statement attempts to remove a materialized view that does not exist.
You cannot execute a DROP MATERIALIZED VIEW statement on an object that is currently being used by another connection.
Executing a DROP MATERIALIZED VIEW statement changes the status of all dependent regular views to INVALID. To determine view dependencies before dropping a materialized view, use the sa_dependent_views system procedure.
You must be the owner of the materialized view, or have the DROP ANY MATERIALIZED VIEW or DROP ANY OBJECT system privilege.
Automatic commit. If the materialized view had been populated, DROP MATERIALIZED VIEW will trigger an automatic checkpoint. Closes all cursors for the current connection.
When a view is dropped, all procedures and triggers are unloaded from memory, so that any procedure or trigger that references the view reflects the fact that the view does not exist. The unloading and loading of procedures and triggers can affect performance if you are regularly dropping and creating views.
Not in the standard.
The following example drops a fictitious materialized view, MyMaterializedView, from the database.
DROP MATERIALIZED VIEW MyMaterializedView;