Triggers
Triggers — Are special types of stored procedures that automatically execute or "fire" in response to specific events on a table or view.
CREATE TRIGGER trigger_name
{BEFORE | AFTER} {INSERT | UPDATE | DELETE}
ON table_name FOR EACH ROW
BEGIN
-- trigger body
END; Are useful for enforcing business rules, maintaining data integrity, and automating system tasks.
Semantic portal