ASA SQL Reference
System Tables
Column name | Column type | Column constraint | Table constraints |
---|---|---|---|
trigger_id | UNSIGNED INT | NOT NULL | Primary key |
table_id | UNSIGNED INT | NOT NULL | Foreign key references SYSTABLE.table_id |
event | CHAR(1) | NOT NULL | Unique |
trigger_time | CHAR(1) | NOT NULL | Unique |
trigger_order | SMALLINT | Unique | |
foreign_table_id | UNSIGNED INT | Unique. Foreign key references SYSFOREIGNKEY | |
foreign_key_id | SMALLINT | Unique. Foreign key references SYSFOREIGNKEY | |
referential_action | CHAR(1) | ||
trigger_name | CHAR(128) | Unique | |
trigger_defn | LONG VARCHAR | NOT NULL | |
remarks | LONG VARCHAR | ||
source | LONG VARCHAR |
Each trigger in the database is described by one row in SYSTRIGGER. The table also contains triggers that are automatically created by the database for foreign key definitions which have a referential triggered action (such as ON DELETE CASCADE).
trigger_id Each trigger is assigned a unique number (the trigger number), which is the primary key for SYSTRIGGER.
table_id The table number uniquely identifies the table to which this trigger belongs.
event The event or events that cause the trigger to fire. This single-character value corresponds to the trigger event that was specified when the trigger was created.
A INSERT, DELETE
B INSERT, UPDATE
C UPDATE
D DELETE
E DELETE, UPDATE
I INSERT
U UPDATE
M INSERT, DELETE, UPDATE
trigger_time The time at which the trigger will fire. This single-character value corresponds to the trigger time that was specified when the trigger was created.
A AFTER
B BEFORE
trigger_order The order in which the trigger will fire. This determines the order that triggers are fired when there are triggers of the same type (insert, update, or delete) that fire at the same time (before or after).
foreign_table_id The table number of the table containing a foreign key definition which has a referential triggered action (such as ON DELETE CASCADE).
foreign_key_id The foreign key number of the foreign key for the table referenced by foreign_table_id.
referential_action The action defined by a foreign key. This single-character value corresponds to the action that was specified when the foreign key was created.
C CASCADE
D SET DEFAULT
N SET NULL
R RESTRICT
trigger_name The name of the trigger. One table cannot have two triggers with the same name.
trigger_defn The command that was used to create the trigger.
remarks A comment string.
source This column contains the original source for the procedure if the preserve_source_format option is ON. It is used to maintain the appearance of the original text. For more information, see PRESERVE_SOURCE_FORMAT option [database].