Trigger Restrictions

Restrictions for using triggers.

  • You can create a trigger only in the current database. If you use an owner name to qualify a trigger, you must explicitly qualify the table name the same way. A trigger can reference objects outside the current database.

  • A trigger cannot apply to more than one table. However, the same trigger action can be defined for more than one user action (for example, insert and update) in the same create trigger statement. A table can have a maximum of three triggers—one each for insert, update, and delete.

  • Each new trigger in a table or column for the same operation (insert, update, or delete) overwrites the previous one. No warning message appears before the previous trigger is overwritten.

  • You cannot create a trigger on a session-specific temporary table.

  • You cannot create a trigger on a view.

  • You cannot create a trigger on a system table.

  • You cannot use triggers that select from a text, unitext, or image column of the inserted or deleted table.

  • Triggers should not include select statements that return results to the user, since special handling that allows modifications to the trigger table must be written into every application program for the returned results.

  • If a trigger references table names, column names, or view names that are not valid identifiers, you must set quoted_identifier on before the create trigger command, and enclose each such name in double quotes. The quoted_identifier option does not need to be on when the trigger fires.