Purpose
This statement is used to drop a materialized view.
Privilege requirements
To drop a materialized view, you must have the DROP TABLE privilege. For more information about OceanBase Database privileges, see Privilege classification in Oracle mode.
Syntax
DROP MATERIALIZED VIEW [ schema. ] materialized_view;
Parameters
| Parameter | Description |
|---|---|
| schema. | Optional. Specifies the schema where the materialized view is located. If you omit schema., the operation will be performed in your own schema. |
| materialized_view | The name of the materialized view. |
Examples
Drop a materialized view named mv_test_tbl1.
DROP MATERIALIZED VIEW mv_test_tbl1;
The return result is as follows:
Query OK, 0 rows affected
