create trigger 月工资变动
after update on 考勤
referencing
oldrow as oldtuple,
newrow as newtuple
for each row
begin
if(oldtuple.一月份缺勤扣薪 != newtuple.一月份缺勤扣薪)
then
update 员工月工资 set 一月份工资=一月份工资-newtuple.一月份扣薪+oldtuple.一月份扣薪
where oldtuple.员工编号=员工月工资.员工编号;
end if;
end;
这是一个关于工资管理数据库的触发器,考勤是一个表,当考勤表中一月份缺勤扣薪改动时,员工工资表中对应的一月份工资变化,在SQL server中出现错误,请问错误在哪?