ALTER TRIGGER statement
The ALTER TRIGGER statement changes the description of a trigger at the current server.
Invocation
This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared only if DYNAMICRULES run behavior is implicitly or explicitly specified.
Authorization
The
privileges held by the authorization ID of the statement must include
at least one of the following privileges:
- SECADM authority
- CREATE_SECURE_OBJECT authority
Syntax
Description
- trigger-name
- Identifies the trigger to be altered. The trigger-name must identify a trigger that exists at the current server (SQLSTATE 42704).
- NOT SECURED or SECURED
- Specifies whether the trigger is considered secure.
- SECURED
- Specifies the trigger is considered secure. SECURED must be specified for a trigger whose subject table is a table on which row level or column level access control has been activated (SQLSTATE 428H8). Similarly, SECURED must be specified for a trigger that is created on a view and one or more of the underlying tables in that view definition has row level or column level access control activated (SQLSTATE 428H8).
- NOT SECURED
- Specifies the trigger is considered not secure. Altering a trigger from secured to not secured fails if the trigger is defined on a table for which row or column level access control is activated (SQLSTATE 428H8). Similarly, altering a trigger from secured to not secured fails if the trigger is defined on a view and one or more of the underlying tables in that view definition has row or column level access control activated (SQLSTATE 428H8).
Examples
- Example 1: Alter trigger TRIGGER1 to SECURED.
ALTER TRIGGER TRIGGER1 SECURED
- Example 2: Alter trigger TRIGGER1 to NOT SECURED.
ALTER TRIGGER TRIGGER1 NOT SECURED