Description
You can use this statement to drop a materialized view log.
Note
When you drop a materialized view log, if a transaction is running on the base table, the drop operation is blocked until the transaction is completed.
Required privileges
You need the DROP TABLE privilege to drop a materialized view log. For more information about privileges in OceanBase Database, see Privilege types in MySQL mode.
Syntax
DROP MATERIALIZED VIEW LOG ON [database.] table;
Parameters
| Parameter | Description |
|---|---|
| database. | The database where the base table of the materialized view log is located. If you do not specify the database. parameter, the database in which you execute the statement is used by default. |
| table | The name of the base table of the materialized view log. |
Example
Drop the materialized view log on the test_tbl1 table.
obclient [test_db]> DROP MATERIALIZED VIEW LOG ON test_tbl1;
The return result is as follows:
Query OK, 0 rows affected