CREATE TRIGGER — Define a simple trigger.
CREATE TRIGGER
CREATE [ OR REPLACE ] TRIGGER <name> { BEFORE | AFTER | INSTEAD OF } { INSERT | UPDATE | DELETE | TRUNCATE } [ OR { INSERT | UPDATE | DELETE | TRUNCATE} ] [, ...] ON <table> [ REFERENCING { OLD AS <old> | NEW AS <new> } ...] [ FOR EACH ROW ] [ WHEN <condition> ] [ DECLARE [ PRAGMA AUTONOMOUS_TRANSACTION; ] <declaration>; [, ...] ] BEGIN <statement>; [, ...] [ EXCEPTION { WHEN <exception> [ OR <exception> ] [...] THEN <statement>; [, ...] } [, ...] ] END