The DROP TRIGGER statement is used to remove a trigger from the database.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.
Prerequisites
The trigger must be in the current user's schema, or the user must have the ALTER ANY TRIGGER system privilege.
To drop a trigger on a DATABASE in another user's schema, you must have the ADMINISTER DATABASE TRIGGER system privilege.
Syntax
The syntax of drop_trigger is as follows:
DROP TRIGGER [ schema. ] trigger ;
Semantics
| Syntax | Keyword or syntax node | Description |
|---|---|---|
| drop_trigger | schema | The name of the schema where the trigger is located. The default value is the current user's schema. |
| drop_trigger | trigger | The name of the trigger to be dropped. |
Examples
Drop the del_new_region trigger.
DROP TRIGGER del_new_region;