delimiter // CREATE TRIGGER person_bi BEFORE INSERT ON person FOR EACH ROW IF NEW.age < 18 THEN SIGNAL SQLSTATE '50001' SET MESSAGE_TEXT = 'Person must be older than 18.'; END IF; // delimiter ;