# Trigger action overview

A trigger action is a simple SQL statement.

For example:

    CREATE TRIGGER . . .
    DELETE FROM FlightAvailability
      WHERE flight_id IN (SELECT flight_id FROM FlightAvailability
        WHERE YEAR(flight_date) < 2005);

The trigger action includes not only the `triggeredSQLStatement` described in the "triggeredSQLStatement" section of the "CREATE TRIGGER statement" topic in the Derby Reference Manual, but also the `[ FOR EACH { ROW | STATEMENT } ]` clause and the `WHEN` clause.

A trigger action has limitations; for example, it cannot contain dynamic parameters or alter the table on which the trigger is defined. These limitations are detailed in the "triggeredSQLStatement" section of the "CREATE TRIGGER statement" topic in the Derby Reference Manual.

Parent topic: Programming trigger actions
Related concepts
Performing referential actions
Accessing before and after rows
Triggers and exceptions
Related reference
Examples of trigger actions