Icon ALTER TRIGGER

Alters an existing trigger on a given table.

Syntax
ALTER TRIGGER <Name> <ActionTime> <Type> ON <TableName>
[AT <ExecutionPos>]
[WHEN <Condition>]
<BodyDefinition>
[DESCRIPTION <Description>]

<ActionTime>=BEFORE|AFTER|ERROR

<Type>=INSERT|UPDATE [OF <UpdateColumns>]|DELETE|LOAD UPDATE|ALL

<UpdateColumns>=

<ColumnName> [,<ColumnName>]

<BodyDefinition> =

BEGIN
   [<Declaration>;]
   [<Declaration>;]
   [<Statement>;]
   [<Statement>;]
[EXCEPTION]
   [<Statement>;]
END

Usage
Use this statement to alter an existing trigger.

Information All clauses after the body definition are optional. If they are not specified, then they will not be altered and will stay the same as before the ALTER TRIGGER statement was executed.

Examples
-- The following statement changes the description of the
-- NotesUpdate trigger.

ALTER TRIGGER "NotesUpdate" AFTER UPDATE OF "Notes"
ON "Customer"
BEGIN
   CALL SendEmail('CustomerReps',NEWROW.Notes);
END
DESCRIPTION 'Sends an email to all customer reps when Notes is updated'

Required Privileges
The current user must be granted the ALTER privilege on the specified table in order to execute this statement. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis SQL statement is an ElevateDB extension.
Image