BEFORE Triggers
Learn BEFORE Triggers (Triggers, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction A BEFORE trigger is a stored routine that MySQL fires automatically before a row is inserted, updated or deleted. Inside it you can read NEW (the incoming row) and OLD (the existing row) and, for INSERT/UPDATE, modify NEW so the corrected value is what actually gets stored.