CREATE TRIGGER statement (advanced)
CREATE TRIGGER schema.triggerName | Specifies the fully qualified name of the trigger to be created | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
VERSION versionNumber | Specifies the version of the trigger | ||||||||||
OWNER triggerOwner | Specifies the owner of the trigger | ||||||||||
CURRENT SCHEMA schema | Specifies the schema of the trigger | ||||||||||
TABLE tableOwner.tableName | Specifies the triggering base table of the associated trigger or the name of the view for an INSTEAD OF trigger | ||||||||||
TBQUALIFIED | Indicates whether the TABLE name was qualified in the CREATE TRIGGER statement TBQUALIFIED parameter values
| ||||||||||
ACTIVATE | Specifies whether to activate the trigger before or after the triggering event ACTIVATE parameter values
| ||||||||||
GRANULARITY | Specifies whether Db2 executes the triggered action for each row or for each statement GRANULARITY parameter values
| ||||||||||
SECURED | Specifies that the trigger is secured | ||||||||||
NOT SECURED | Specifies that the trigger is not secured | ||||||||||
ONEVENT | Specifies when Db2 executes the trigger ONEVENT parameter values
| ||||||||||
REFOLDCORR correlationName | Specifies the OLD AS correlation name | ||||||||||
REFNEWCORR correlationName | Specifies the NEW AS correlation name | ||||||||||
REFOLDTB identifier | Specifies the OLD _TABLE AS identifier | ||||||||||
REFNEWTB identifier | Specifies the NEW_TABLE AS identifier | ||||||||||
COMMENT 'string' | Specifies the comment for the trigger | ||||||||||
PATH (schemaList) | Specifies the path for the trigger | ||||||||||
TRIGGERTEXT (triggerText) | Specifies the triggered action for the trigger |
ACTIVE | Specifies whether to activate the version of the trigger ACTIVE parameter values
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
APPLCOMPAT | Specifies the package compatibility level for SQL APPLCOMPAT parameter values
| ||||||||||||
APPLICATION_ENCODING_SCHEME | Specifies the encoding scheme for the trigger APPLICATION_ENCODING_SCHEME parameter values
| ||||||||||||
ARCHIVE SENSITIVE | Specifies whether references to archive-enabled tables in SQL statements are affected by the value of the SYSIBMADM.GET_ARCHIVE global variable ARCHIVE SENSITIVE parameter values
| ||||||||||||
ASUTIME n | Specifies the number of CPU service units for the trigger A value of 0 indicates that no limit exists on the number of units. Valid values for n are from 1 through 2147483647. | ||||||||||||
BUSINESS_TIME SENSITIVE | Specifies whether references to application-period temporal tables in both static and dynamic SQL statements are affected by the value of the CURRENT TEMPORAL BUSINESS_TIME special register BUSINESS_TIME SENSITIVE parameter values
| ||||||||||||
CONCURRENT_ACCESS_RESOLUTION | Specifies the concurrent access resolution option to use for statements in a package CONCURRENT_ACCESS_RESOLUTION parameter values
|
CURRENT_DATA | Specifies whether to require data currency for cursors when the isolation level of cursor stability is in effect CURRENT_DATA parameter values
| ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DATE_FORMAT | Specifies the date format for the trigger DATE_FORMAT parameter values
| ||||||||||||||
DEBUG_MODE | Specifies whether the trigger is allowed for debugging DEBUG_MODE parameter values
| ||||||||||||||
DECIMAL | Specifies the rules for a decimal operation (DEC31 or DEC15) DECIMAL parameter values
| ||||||||||||||
DYNAMICRULES | Specifies the values for the dynamic SQL attributes DYNAMICRULES parameter values
| ||||||||||||||
EXPLAIN | Specifies whether to add information about the package’s statements to the owner of the PLAN_TABLE table EXPLAIN parameter values
| ||||||||||||||
IMMEDIATE_WRITE | Specifies whether to immediately write updates that are made to dependent page sets for group buffer pools IMMEDIATE_WRITE parameter values
|
ISOLATION_LEVEL | Specifies the isolation level ISOLATION_LEVEL parameter values
| ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OPTHINT | Specifies the value of the query optimization hint bind option OPTHINT parameter values
| ||||||||||||||||||
QUALIFIER | Specifies the implicit qualifier for the unqualified object names in the SQL statements QUALIFIER parameter values
| ||||||||||||||||||
RELEASE_AT | Specifies the release resources when the package was last bound or rebound RELEASE_AT parameter values
| ||||||||||||||||||
ROUNDING | Specifies the rounding mode when the package is bound ROUNDING parameter values
| ||||||||||||||||||
SQL_PATH | Specifies the SQL path that Db2 uses to resolve unqualified types and names in the trigger SQL_PATH parameter values
|
SYSTEM_TIME SENSITIVE | Specifies whether references to system-period temporal tables in both static and dynamic SQL statements are affected by the value of the CURRENT TEMPORAL SYSTEM_TIME special register SYSTEM_TIME SENSITIVE parameter values
| ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TIME_FORMAT | Specifies the time format for values TIME_FORMAT parameter values
| ||||||||||||||
FOR_UPDATE_CLAUSE | Specifies whether the FOR UPDATE clause is required or optional for a DECLARE CURSOR statement FOR_UPDATE_CLAUSE parameter values
| ||||||||||||||
CONCENTRATE | Specifies whether a dynamic SQL statement that specifies literal constants will be cached as a separate unique statement entry in the dynamic statement cache instead of sharing an existing statement in the cache CONCENTRATE parameter values
| ||||||||||||||
WLM_ENVIRONMENT | Specifies the workload manager (WLM) environment in which the trigger runs WLM_ENVIRONMENT parameter values
|