CREATE OR REPLACE TRIGGER DTULTATU_PREVVNDPRODHR
BEFORE INSERT OR UPDATE OR DELETE
ON PREVVNDPRODHR FOR EACH ROW
BEGIN
   IF INSERTING THEN
      :NEW.DTULTATU := SYSDATE;
   END IF;
   IF UPDATING THEN
      :NEW.DTULTATU := SYSDATE;
   END IF;
END;
/


ALTER TABLE PREVVNDPRODHR MODIFY DTULTATU DEFAULT SYSDATE
/

UPDATE PREVVNDPRODHR SET DTULTATU = SYSDATE WHERE DTULTATU IS NULL
/

-- VERSAO --
BEGIN ATUVEROBJ('DTULTATU_PREVVNDPRODHR','6.39.004'); END;
/

