SHARE
TWEET

Untitled

a guest Jun 19th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. delimiter $$
  2. create trigger Atualiza_Pedido
  3.  
  4. after insert on loja.pedido for each row
  5.  
  6. Begin
  7.  
  8. if new.method = 'metodo'
  9.  
  10. then
  11.  
  12. update loja.pedido
  13. set tipo = concat(new.quantidade,'-', new.tipo)
  14. where id = new.id;
  15.  
  16. end if;
  17. END$$
  18.      
  19. delimiter $$
  20. create trigger Atualiza_Pedido
  21.  
  22. before insert on loja.pedido for each row
  23. Begin
  24.     if new.method = 'metodo' then
  25.         set new.tipo = concat(new.quantidade,'-', new.tipo);
  26.     end if;
  27. END$$
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top