Check_Salary
Timing Before
Object Event Update
Fire for Each Row
begin
  if :old.salary>:new.salary then
   raise_application_error(-20067,'Salary must be higher than the last one!');
  end if;
  
  insert into XL_emp_bonus
  (emp_id, last_name, salary, bonus)
  values(:OLD.emp_id, :OLD.last_name, :OLD.salary, :OLD.bonus);
end;