Created
January 19, 2020 16:55
-
-
Save mkaranasou/028364d41ea7b49b59a49ba1a83bbb7b to your computer and use it in GitHub Desktop.
Before insert trigger example - Postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----- Attach before insert trigger to table -------- | |
DROP TRIGGER IF EXISTS before_insert_customer_transactions_trigger on customer_transactions; | |
CREATE TRIGGER before_insert_customer_transactions_trigger | |
BEFORE INSERT ON customer_transactions | |
FOR EACH ROW EXECUTE PROCEDURE customer_transactions_insert_trigger(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment