Share
Explore BrainMass

Trigger in Oracle

Trigger for comparing an employee's salary with that his or her supervisor.

Explain why this Trigger is not work.

CREATE TRIGGER INFORM_SUPERVISOR1
BEFORE INSERT OR UPDATE OF SALARY, SUPERVISOR_SSN ON EMPLOYEE
FOR EACH ROW
WHEN
(NEW.SALARY > (SELECT SALARY FROM EMPLOYEE
WHERE SSN=NEW.SUPERVISOR_SSN))
INFORM_SUPERVISOR(NEW.SUPERVISOR_SSN,NEW.SSN);

Solution Summary

Trigger in Oracle is modeled.

$2.19