FirebirdSQL logo
 VIEWPROCEDURE 

The Trigger Body

The trigger body is either a PSQL body, or an external UDR module body.

See The Module Body in the PSQL chapter for details.

DML Triggers (on Tables or Views)

DML — or “relation” — triggers are executed at the row (record) level, every time a row is changed.A trigger can be either ACTIVE or INACTIVE.Only active triggers are executed.Triggers are created ACTIVE by default.

Who Can Create a DML Trigger?

DML triggers can be created by:

  • Administrators

  • The owner of the table (or view)

  • Users with — for a table — the ALTER ANY TABLE, or — for a view — ALTER ANY VIEW privilege

Forms of Declaration

Firebird supports two forms of declaration for relation triggers:

  • The legacy syntax

  • The SQL standard-compliant form (recommended)

A relation trigger specifies — among other things — a phase and one or more events.