use um gatilho de inserção para isso. Algo assim
DELIMITER |
CREATE TRIGGER default_yearly BEFORE INSERT ON employee
FOR EACH ROW BEGIN
SET NEW.employeeyearly = NEW.employeemonthly * 12;
END;
|
DELIMITER ;
DELIMITER |
CREATE TRIGGER default_yearly BEFORE INSERT ON employee
FOR EACH ROW BEGIN
SET NEW.employeeyearly = NEW.employeemonthly * 12;
END;
|
DELIMITER ;