oracle 触发器-插入数据前设置字段值

CREATE OR REPLACE TRIGGER TRI_BEFORE_INSERT_BIS_ACC_DTL 
before INSERT ON BIS_ACC_DTL 
FOR EACH row 
BEGIN 
        IF :NEW.BIF_CODE = '' THEN
        :NEW.VOUCHER_NO := :NEW.BANK_SERIAL_NO;
        END IF;
END TRI_BEFORE_INSERT_BIS_ACC_DTL;

 

posted @ 2021-11-29 10:54  _万古如长夜  阅读(452)  评论(0编辑  收藏  举报