delete backup<br />
DROP TRIGGER IF EXIST  before_salaries_delete;<br />
DELIMITER $$<br />
CREATE TRIGGER before_salaries_delete<br />
BEFORE DELETE<br />
ON salaries FOR EACH ROW<br />
BEGIN<br />
    INSERT INTO SalaryArchives(employeeNumber,validFrom,amount)<br />
    VALUES(OLD.employeeNumber,OLD.validFrom,OLD.amount);<br />
END$$<br />
DELIMITER ;<br />
<a href="https://www.youtube.com/watch?v=gy6LY0Xy2zU">Youtube설명</a><br />
<a href="https://www.mysqltutorial.org/mysql-triggers/mysql-before-delete-trigger/"> google설명</a>