CREATE OR REPLACE TRIGGER TRIGGER_AUTOCHANGE_ZGZH AFTER UPDATE OF identification ON ysb1.tb_obj_person_basic FOR EACH ROW DECLARE licenseId varchar2(255) :=''; serialnumberOld varchar2(255) :=''; BEGIN select l.id,l.serialnumber into licenseId,serialnumberOld from tb_obj_person_license l where l.person_id = :old.id and l.trade_id = '5'; update tb_obj_person_license l set l.serialnumber = :new.identification where l.person_id = :old.id and l.trade_id = '5'; insert into tb_obj_person_log values( sys_guid(), '', sysdate, 'UPDATE', '', '0', '资格证号由['||serialnumberOld||']变更为['||:new.identification||']', '', :old.id, 'FLOWCASE', licenseId, 'shjt.license.model.TbObjPersonLicense'); END;