Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Stored procedures, triggers, batches, and user-defined functions

 

Triggers

A trigger is a special form of stored procedure that is executed automatically when a statement that modifies data is executed. You use triggers whenever referential integrity and other declarative constraints are insufficient.

You may want to enforce a more complex form of referential integrity involving more detailed checking, or you may want to enforce checking on new data, but allow legacy data to violate constraints. Another use for triggers is in logging the activity on database tables, independent of the applications using the database.

Note

There are three special statements that triggers do not fire after: LOAD TABLE, TRUNCATE, and WRITETEXT.

 Privileges to execute triggers
 Trigger types
 Trigger events
 See also
 Trigger times

Creating a trigger on a table (Sybase Central)
Creating a trigger on a table (SQL)
Trigger execution
Altering a trigger
Dropping a trigger
Example: Temporarily disabling trigger operations
Privileges to execute triggers
Advanced information on triggers