CREATE OR REPLACE TRIGGER C...

Download Link
CREATE OR REPLACE TRIGGER CHECK_EXPIRY<br />
BEFORE INSERT ON PASSENGER<br />
<br />
BEGIN <br />
IF (:NEW.PASSPORT_EXPIRY >= SYSDATE) THEN<br />
		RAISE ALREADY_EXPIRED;<br />
END IF;<br />
EXCEPTION<br />
WHEN ALREADY_EXPIRED THEN<br />
RAISE_APPLICATION_ERROR (-20004, 'Passport already expired');	<br />
END;<br />
/<br />