Documentation Home
MySQL 5.6 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 31.4Mb
PDF (A4) - 31.5Mb
PDF (RPM) - 29.8Mb
HTML Download (TGZ) - 7.5Mb
HTML Download (Zip) - 7.5Mb
HTML Download (RPM) - 6.5Mb
Man Pages (TGZ) - 177.2Kb
Man Pages (Zip) - 287.5Kb
Info (Gzip) - 3.0Mb
Info (Zip) - 3.0Mb
Excerpts from this Manual

13.1.30 DROP TRIGGER Syntax

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.

Use IF EXISTS to prevent an error from occurring for a trigger that does not exist. A NOTE is generated for a nonexistent trigger when using IF EXISTS. See Section, “SHOW WARNINGS Syntax”.

Triggers for a table are also dropped if you drop the table.

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
  Posted by NOT_FOUND NOT_FOUND on October 15, 2014
shell command line drop all triggers in one schemata:

mysql -B --column-names=FALSE -e "SELECT CONCAT('DROP TRIGGER ', TRIGGER_NAME, ';') FROM information_schema.TRIGGERS WHERE TRIGGER_SCHEMA = SCHEMA();" yourdatabase

will output the drop statements:

DROP TRIGGER my_table1_aft_ins;
DROP TRIGGER my_table1_aft_upt;
DROP TRIGGER my_table1_aft_delete;
DROP TRIGGER my_table2_aft_insert;
DROP TRIGGER my_table2_aft_update;

you can repipe it to mysql, or text file for editing, etc.

Sign Up Login You must be logged in to post a comment.