-1
如何創建觸發器MySQL更新員工表中的薪水並將薪金列中的舊值替換爲old_salary列?創建觸發器MySQL更新員工表中的工資
如何創建觸發器MySQL更新員工表中的薪水並將薪金列中的舊值替換爲old_salary列?創建觸發器MySQL更新員工表中的工資
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;
數據庫爲MySQL或Oracle? – user75ponic