Firebird Documentation Index → Firebird 1.5 Language Ref. Update → DDL statements → ALTER TRIGGER |
Available in: DSQL, ESQL
Added in: 1.5
Description: The ALTER TRIGGER syntax has been extended to support multi-action triggers. For a full discussion of this feature, see CREATE TRIGGER :: Multi-action triggers.
Syntax:
ALTER TRIGGERtrigger-name
[ACTIVE | INACTIVE] {BEFORE | AFTER}<actions>
[POSITIONnumber
] AS<trigger_body>
<actions>
::=<single_action>
[OR<single_action>
[OR<single_action>
]]<single_action>
::= INSERT | UPDATE | DELETE
Changed in: 1.0
Description: Each time you use CREATE, ALTER or DROP TRIGGER, InterBase increments the metadata change counter of the associated table. Once that counter reaches 255, no more metadata changes are possible on the table (you can still work with the data though). A backup-restore cycle is needed to reset the counter and perform metadata operations again.
While this obligatory cleanup after many metadata changes is in itself a useful feature, it also means that users who regularly use ALTER TRIGGER to deactivate triggers during e.g. bulk import operations are forced to backup and restore much more often then needed.
Since changes to triggers don't imply structural changes to the table itself, Firebird no longer increments the table change counter when CREATE, ALTER or DROP TRIGGER is used. One thing has remained though: once the counter is at 255, you can no longer create, alter or drop triggers for that table.
Firebird Documentation Index → Firebird 1.5 Language Ref. Update → DDL statements → ALTER TRIGGER |