How To Manage and Use MySQL Database Triggers on Ubuntu 18.04
In MySQL a trigger is a user-defined SQL command that is invoked automatically during an INSERT, DELETE, or UPDATE operation. The trigger code is associated with a table and is destroyed once a table is dropped. You can specify a trigger action time and set whether it will be activated before or after the defined database event. In this tutorial, you’ll create, use, and delete different types of triggers on your MySQL database.