Skip Headers

Oracle9i SQL Reference
Release 2 (9.2)

Part Number A96540-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page Go to next page
View PDF

DROP MATERIALIZED VIEW

Purpose

Use the DROP MATERIALIZED VIEW statement to remove an existing materialized view from the database.


Note:

The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.


See Also:

Prerequisites

The materialized view must be in your own schema or you must have the DROP ANY MATERIALIZED VIEW system privilege. You must also have the privileges to drop the internal table, views, and index that Oracle uses to maintain the materialized view's data.

See Also:

DROP TABLE, DROP VIEW, and DROP INDEX for information on privileges required to drop objects that Oracle uses to maintain the materialized view

Syntax

drop_materialized_view::=

Text description of statements_854.gif follows
Text description of drop_materialized_view


Semantics

schema

Specify the schema containing the materialized view. If you omit schema, Oracle assumes the materialized view is in your own schema.

materialized_view

Specify the name of the existing materialized view to be dropped.

Examples

Dropping a Materialized View: Examples

The following statement drops the materialized view emp_data in the sample schema hr:

DROP MATERIALIZED VIEW emp_data; 

The following statement drops the sales_by_month_by_state materialized view and the underlying table of the materialized view (unless the underlying table was registered in the CREATE MATERIALIZED VIEW statement with the ON PREBUILT TABLE clause):

DROP MATERIALIZED VIEW sales_by_month_by_state;