create or replace TRIGGER "VALIDATE_DOA_DOD" BEFORE UPDATE ON IN_PATIENT
FOR EACH ROW
BEGIN
IF :NEW.DOD < :OLD.DOA THEN
enter code here
RAISE EX_INVALID_DOD;
END IF;
EXCEPTIION
WHEN EX_INVALID_DOD THEN
dbms_output.put_line('Date Of Discharge must be greater or equal to Date of Admition');
END;
'enter code here'
with something meaningful, or remove itEXCEPTIION
into EXCEPTION
EX_INVALID_DOD
So:
create or replace TRIGGER "VALIDATE_DOA_DOD" BEFORE UPDATE ON IN_PATIENT
FOR EACH ROW
declare
EX_INVALID_DOD exception;
BEGIN
IF :NEW.DOD < :OLD.DOA THEN
--enter code here
RAISE EX_INVALID_DOD;
END IF;
EXCEPTION
WHEN EX_INVALID_DOD THEN
dbms_output.put_line('Date Of Discharge must be greater or equal to Date of Admition');
END;