Skip to content

Instantly share code, notes, and snippets.

@mkaranasou
Created January 19, 2020 16:55
Show Gist options
  • Save mkaranasou/028364d41ea7b49b59a49ba1a83bbb7b to your computer and use it in GitHub Desktop.
Save mkaranasou/028364d41ea7b49b59a49ba1a83bbb7b to your computer and use it in GitHub Desktop.
Before insert trigger example - Postgres
----- 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