solidDB Help : Programming : SQL extensions : Triggers
  
Triggers
A trigger is a mechanism for executing a series of SQL statements when a particular action (an INSERT, UPDATE, or DELETE statement) occurs. The trigger contains one or more SQL statements that are executed when the trigger is invoked.
You can create one or more triggers on a table, with each trigger defined to activate on a specific INSERT, UPDATE, or DELETE statement. When a user modifies data within the table, the trigger that corresponds to the statement is activated.
You can use only inline SQL or stored procedures with triggers. If you use a stored procedure in the trigger, the procedure must be created with the CREATE PROCEDURE statement. A procedure that is initiated in the body of a trigger can initiate other triggers.
Triggers enable you to complete the following tasks:
implement special integrity constraints, such as checking that certain conditions are maintained, for example, to prevent users from making incorrect or inconsistent data changes,
take action based on the value of a row, before or after modification,
transfer much of the logic processing to the server, reducing the amount of work that your application does, as well as reducing network traffic.
Triggers are created with the CREATE TRIGGER statement (see CREATE TRIGGER) and dropped from the system catalog with the DROP TRIGGER statement (see DROP TRIGGER). Triggers can also be disabled with the ALTER TRIGGER statement (see ALTER TRIGGER).
You can obtain information about the triggers in your database in the following ways:
Use the trigger functions, see Trigger functions.
Perform a query on the SYS_TRIGGERS table, see SYS_TRIGGERS.
See
Triggers: Principles of operation
Creating and modifying triggers
Triggers and procedures
Triggers and transactions
Trigger privileges and security
Raising errors from inside triggers
Trigger parameter settings
Trigger examples
Go up to
SQL extensions