实现功能:
插入数据前触发,检查与插入数据几个属性相同的在表中的列将状态改为false,再执行插入。
解决方案:
CREATE OR REPLACE TRIGGER tri_insert BEFORE INSERT ON tbl_bank_pos_info FOR EACH ROW begin update tbl_bank_pos_info set STAT=‘N‘ where pos_mer_id = :new.pos_mer_id and pos_term_id = :new.pos_term_id and stat=‘Y‘; end;
时间: 2024-11-05 17:19:04