I have two tables as follows
Emp(eno, ename, sal)
salHistory( empNo, ename, oldSal, newSal, salDif)
What I want to know is how to create a trigger (Name of the trigger is salary_change) that should be fired whenever the "Emp" table get UPDATE
Statement to change the salary column (Sal)
of an employee. Objective of this trigger is to write empNo
, ename
, oldSal
, newSal
, salDif
to the table call SalHistory
.
(In here salDi
f means the salary difference)
Thanks .....