Contents IndexALTER TABLE statement ALTER VIEW statement

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 43. Watcom-SQL Statements
      ALTER TRIGGER statement

Function

To replace a trigger definition with a modified version. You must include the entire new trigger definition in the ALTER TRIGGER statement.

Syntax

     ALTER TRIGGER trigger-name trigger-time trigger-event[,trigger-event,..]
          ... [ ORDER integer ] ON table-name
          ... [ REFERENCING [ OLD AS old-name ]
                          [ NEW AS new-name ] ]
                          [ REMOTE AS remote-name ] ]
          ... [ FOR EACH { ROW | STATEMENT } ]
          ... [ WHEN ( search-condition ) ]
          ... [ IF UPDATE ( column-name) THEN
          ... [ { AND | OR} UPDATE ( column-name) ] ... ]
                  ... compound-statement
          ... [ ELSEIF UPDATE ( column-name) THEN
          ... [ { AND | OR} UPDATE ( column-name) ] ...
                  ... compound-statement
          ... END IF ] ]

Parameters

     trigger-time:
          BEFORE | AFTER | RESOLVE

     trigger-event:
          DELETE | INSERT | UPDATE | UPDATE OF column-list

Usage

Anywhere.

Permissions

Must be the owner of the table on which the trigger is defined, or be DBA.

Side effects

Automatic commit.

See also

Description

The ALTER TRIGGER statement is identical in syntax to the CREATE TRIGGER statement except for the first word. The ALTER TRIGGER statement replaces the entire contents of the CREATE TRIGGER statement with the contents of the ALTER TRIGGER statement.

Contents IndexALTER TABLE statement ALTER VIEW statement