I have a table staff with office column. Currently the office column do not accept NULL values. The application persisting onto this t
staff
office
Shouldn't it be something like this:
DELIMITER $$ CREATE TRIGGER staffOfficeNullReplacerTrigger BEFORE INSERT ON Staff FOR EACH ROW BEGIN IF (NEW.office IS NULL) THEN INSERT INTO Staff(office) VALUES("N/A"); END IF; END$$