CREATE TABLE employee( name VARCHAR(45) NOT NULL, occupation VARCHAR(35) NOT NULL, working_date DATE, working_hours INT ); INSERT INTO employee VALUES ('Robin', 'Scientist', '2020-10-04', 12), ('Warner', 'Engineer', '2020-10-04', 10), ('Peter', 'Actor', '2020-10-04', 13), ('Marco', 'Doctor', '2020-10-04', 14), ('Brayden', 'Teacher', '2020-10-04', 12), ('Antonio', 'Business', '2020-10-04', 11); SELECT * FROM employee; DELIMITER && CREATE TRIGGER before_insert_empworkinghours BEFORE INSERT ON employee FOR EACH ROW BEGIN IF NEW.working_hours < 0 THEN SET NEW.working_hours = 0; END IF; END && INSERT INTO employee VALUES ('Markus', 'Farmer', '2020-10-08', 14); INSERT INTO employee VALUES ('Alexander', 'Actor', '2020-10-12', -13); SELECT * FROM employee; SHOW TRIGGERS; DROP TRIGGER before_insert_empworkinghours;