Error on a trigger in Mysql

Asked

Viewed 10 times

0

create trigger GatilhoRecebimento after insert on recebimentos for each row

begin

    update caixa set valorcréditos_caixa = valorcréditos_caixa + new.valor_receb where caixa.cod_caixa = recebimentos.cod_caixa;

end

$$ delimiter ;

I’m not finding the error of this trigger.

The error is as follows:

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6    0.000 sec
  • I already found the error. I was missing a delimiter at the beginning of the trigger.

  • Add your problem solution as Question Answer to finish the topic.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.