标签: mysql plsql
如何创建触发MySQL来更新员工表中的工资并将工资栏中的旧值替换为旧工资栏?
答案 0 :(得分:0)
请参阅CREATE TRIGGER Syntax:
create trigger salary_trigger before update on employee for each row begin if new.salary != old.salary then set new.old_salary = old.salary end if; end;