Skip to content

Instantly share code, notes, and snippets.

@Lucbm99
Created May 26, 2021 01:21
Show Gist options
  • Save Lucbm99/206a034e1a8c37d05c01ef4c4393657c to your computer and use it in GitHub Desktop.
Save Lucbm99/206a034e1a8c37d05c01ef4c4393657c to your computer and use it in GitHub Desktop.
CREATE TRIGGER trigger_desconto_produto BEFORE INSERT
on PRODUTOS_SERVICOS
FOR EACH ROW
SET NEW.preco_desconto = (NEW.valor * 0.90);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment