You are on page 1of 1

create funtion sp_test() reurn triger

as
$$
vegin
insert into campeonato_trigger calues (old.cod_trof, old.nombre_trofeo);

return new;
end
$$
language plpgsql;

create trugger tr_update before update on campeonato


for each row
execute procedure sp_test():

update campeonato set


cod_trof = '1120',
nombre_trofeo = 'hola'
where cod_trof = '1110'

You might also like