Answers for "postgres create trigger if not exists"

SQL
0

postgres create trigger if not exists

-- SYNTAX
CRRATE TRIGGER trigger_name {BEFORE|AFTER|INSTEAD OF} { event [ OR ... ] }
ON table_name
[ FROM referenced_table_name ]
[ NOT DEFERRABLE | [ DEFERRABLE ] [ INITIALLY IMMEDIATE | INITIALLY DEFERRED ] ]
[ REFERENCING { { OLD | NEW } TABLE [ AS ] transition_relation_name } [ ... ] ]
[ FOR [ EACH ] { ROW | STATEMENT } ]
[ WHEN ( condition ) ]
EXECUTE {FUNCTION|PROCEDURE} function_name ( arguments )

-- EXAMPLE
CREATE TRIGGER test_trigger
  AFTER INSERT
  ON test_table
  FOR EACH ROW
  EXECUTE PROCEDURE test();
Posted by: Guest on May-04-2022

Code answers related to "postgres create trigger if not exists"

Code answers related to "SQL"

Browse Popular Code Answers by Language