Source: cirosantilli/iso-sql-trigger-syntax

= ISO SQL TRIGGER syntax
{c}
{tag=Database trigger}
{tag=SQL standard}

TODO what is the standard compliant syntax?

<PostgreSQL> requires you to define a <SQL stored procedure>: https://stackoverflow.com/questions/28149494/is-it-possible-to-create-trigger-without-execute-procedure-in-postgresql Their syntax may be standard compliant, not sure about the `EXECUTE` part. Their docs: https://www.postgresql.org/docs/current/sql-createtrigger.html

<SQLite> does not support <SQL stored procedures> at all, so maybe that's why they can't be standard compliant here: https://stackoverflow.com/questions/3335162/creating-stored-procedure-in-sqlite

<SQL:1999> 11.38 covers "Trigger definition". The <Abstract syntax tree> starts with the `CREATE TRIGGER` and ends in:
``
<triggered SQL statement> ::=
  <SQL procedure statement>
``

This is defined at 13.5 "SQL procedure statement", but that is humongous and I'm not sure what it is at all.