请帮助我,如何填写正确的值?因为该值总是较小,并且显示 ERR 没有足够的值,所以错误在这里
这是我的代码:
CREATE OR REPLACE TRIGGER REGION_HILMI_TRIGGER_WARNING
AFTER INSERT OR UPDATE OR DELETE ON REGION_HILMI
FOR EACH ROW
DECLARE
warning VARCHAR2(400);
BEGIN
IF INSERTING THEN
warning:='Terjadi penambahan data di tabel regions, dengan
nilai region_id='||:NEW.region_id||' dan
region_name='||:NEW.region_name;
ELSIF UPDATING THEN
warning:='Terjadi perubahan data di tabel regions, dengan
nilai lama region_id='||:OLD.region_id||',
region_name='||:OLD.region_name||' nilai baru
region_id='||:NEW.region_id||', region_name='||:NEW.region_name;
ELSIF DELETING THEN
warning:='Terjadi penghapusan data di tabel regions untuk
region_id='||:OLD.region_id||' dan region_name='||:OLD.region_name;
END IF;
INSERT INTO REGION_HILMI_HISTORY(OLD_REGION_ID,OLD_REGION_NAME,NEW_REGION_ID,NEW_REGION_NAME,CHANGE_TIME,DESCRIPTION)
VALUES(REGION_HILMI_SEQUENCE.NEXTVAL,USER,TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'),warning);
END;
/