SQL
trigger tgr_competicio_0
-- AFTER INSERT OR UPDATE ON COMPETICIO 
AFTER INSERT OR UPDATE ON table1
FOR EACH ROW 
DECLARE
  temp temporada.temporada_id%type;
begin
  select temporada_id into temp from competicio where competicio_id = :old.competicio_id;
  modul_estadistic.actualitza_m_e_c2(:old.competicio_id);
  if (:old.temporada_id != null) then modul_estadistic.actualitza_M_E_C6(:old.competicio_id, :new.temporada_id); end if;
  modul_estadistic.actualitza_M_E_C7();
END;