Creates TRIGGER
to_lower
that will run before updating any student and makes
first_name
lower case
DROP TRIGGER IF EXISTS to_lower;

CREATE TRIGGER to_lower
BEFORE UPDATE ON students
FOR EACH ROW
    SET NEW.first_name = LOWER(NEW.first_name);
by Valeri Tandilashvili
4 years ago
MySQL
TRIGGERS
Full MySQL Course for Beginners
1
Pro tip: use ```triple backticks around text``` to write in code fences