create trigger

Description

Creates a trigger, a type of stored procedure that is often used for enforcing integrity constraints. A trigger executes automatically when a user attempts a specified data modification statement on a specified table.

Syntax

create trigger [owner.]trigger_name 
on [owner.]table_name 
for {insert, update, delete} 
as SQL_statements

Or, using the if update clause:

create trigger [owner.]trigger_name 
on [owner.]table_name 
for {insert, update} 
as 
    [if update (column_name) 
        [{and | or} update (column_name)]...] 
        SQL_statements
    [if update (column_name) 
        [{and | or} update (column_name)]... 
        SQL_statements]...

Usage

Usage


Server Class ASEnterprise


Server Class ASAnywhere


Server Class ASIQ


Server Class sql_server


Server Class direct_connect


Server Class db2


Server Class genereic