DROP TRIGGER [IF EXISTS] [schema_name
.]trigger_name
This statement drops a trigger. 这句话会触发。The schema (database) name is optional. 架构(数据库)名称是可选的。If the schema is omitted, the trigger is dropped from the default schema. 如果省略模式,则从默认模式中删除触发器。DROP TRIGGER
requires the TRIGGER
privilege for the table associated with the trigger.DROP TRIGGER
要求与TRIGGER
关联的表具有触发器权限。
Use 使用IF EXISTS
to prevent an error from occurring for a trigger that does not exist. IF EXISTS
可防止不存在的触发器发生错误。A 当使用NOTE
is generated for a nonexistent trigger when using IF EXISTS
. IF EXISTS
时,将为不存在的触发器生成NOTE
。See Section 13.7.7.42, “SHOW WARNINGS Statement”.请参阅第13.7.7.42节,“SHOW WARNINGS语句”。
Triggers for a table are also dropped if you drop the table.如果删除表,也会删除表的触发器。