CREATE OR REPLACE TRIGGER SalaryRestriction BEFORE INSERT OR UPDATE ON professor FOR EACH ROW
BEGIN
  IF (INSERTING AND :new.salary < 70000)
    THEN RAISE_APPLICATION_ERROR (-20004, 'Violation of Minimum Salary constraint');
  END IF;
  IF (UPDATING AND :new.salary < :old.salary)
    THEN RAISE_APPLICATION_ERROR (-20004, 'Violation of Salary constraint: Decreasing Salary');
  END IF;
END;
.
