How can we destroy a trigger?

MySQLMySQLi Database

We can destroy a trigger in two ways −

Dropping a trigger explicitly

With the help of the DROP statement, we can destroy a trigger explicitly. It can be understood with the help of the following example −

mysql> DROP Trigger before_inser_studentage1;
Query OK, 0 rows affected (0.05 sec)

Dropping a trigger implicitly

A trigger will be destroyed implicitly if the table with which it is associated is destroyed or if the database which it is associated is destroyed.

Published on 22-Feb-2018 11:45:21