DROP TRIGGER [IF EXISTS] [
This statement drops a trigger. The schema (database) name is
optional. If the schema is omitted, the trigger is dropped from
the default schema.
was added in MySQL 5.0.2. Its use requires the
IF EXISTS to prevent an error from
occurring for a trigger that does not exist. A
NOTE is generated for a nonexistent trigger
IF EXISTS. See
Section 220.127.116.11, “
SHOW WARNINGS Syntax”. The
clause was added in MySQL 5.0.32.
Triggers for a table are also dropped if you drop the table.
Prior to MySQL 5.0.10, the table name was required instead of
the schema name
When upgrading from a previous version of MySQL 5.0 to MySQL
5.0.10 or newer, you must drop all triggers and re-create them.
DROP TRIGGER does not
work for older triggers after the upgrade. See
Section 18.104.22.168, “Upgrading from MySQL 4.1 to 5.0”, for a
suggested upgrade procedure.
In addition, triggers created in MySQL 5.0.16 or later cannot be dropped following a downgrade to MySQL 5.0.15 or earlier. If you wish to perform such a downgrade, you must also in this case drop all triggers prior to the downgrade, and then re-create them afterward.
(For more information about these two issues, see Bug #15921 and Bug #18588.)
Copyright © 1997, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices