create or replace trigger B_AFTER_ALL
after insert or update or delete on B
for each row
declare
strTableName varchar(32) := 'B';
strValues varchar(256);
strPrimaryKeys varchar(256);
begin
if UPDATING then
strValues :='xueji='||:new.xueji;
strPrimaryKeys := 'STUDENTNUM='||:new.STUDENTNUM;
update A set strValues where strPrimaryKeys;
end if;
exception
when others then null;
end B_AFTER_ALL;
/