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

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Reference » Views » System views

 

SYSTRIGGER system view

Each row in the SYSTRIGGER system view describes one trigger in the database. This view also contains triggers that are automatically created for foreign key definitions which have a referential triggered action (such as ON DELETE CASCADE). The underlying system table for this view is ISYSTRIGGER.

Column name Data type Description
trigger_id UNSIGNED INT A unique number for the trigger in the SYSTRIGGER view.
table_id UNSIGNED INT The table ID of the table to which this trigger belongs.
object_id UNSIGNED BIGINT The object ID for the trigger in the database.
event CHAR(1)

The operation that causes the trigger to fire.

  • A   INSERT, DELETE

  • B   INSERT, UPDATE

  • C   UPDATE COLUMNS

  • D   DELETE

  • E   DELETE, UPDATE

  • I   INSERT

  • M   INSERT, DELETE, UPDATE

  • U   UPDATE

trigger_time CHAR(1)

The time when the trigger fires relative to the event.

  • A   AFTER (row-level trigger)

  • B   BEFORE (row-level trigger)

  • I   INSTEAD OF (row-level trigger)

  • K   INSTEAD OF (statement-level trigger)

  • R   RESOLVE

  • S   AFTER (statement-level trigger)

trigger_order SMALLINT

The order in which are fired when there are multiple triggers of the same type (insert, update, or delete) set to fire at the same time (applies to BEFORE or AFTER triggers only, only).

foreign_table_id UNSIGNED INT The ID of the table containing a foreign key definition that has a referential triggered action (such as ON DELETE CASCADE). The foreign_table_id value reflects the value of ISYSIDX.table_id.
foreign_key_id UNSIGNED INT The ID of the foreign key for the table referenced by foreign_table_id. The foreign_key_id value reflects the value of ISYSIDX.index_id.
referential_action CHAR(1)

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 CHAR(128) The name of the trigger. One table cannot have two triggers with the same name.
trigger_defn LONG VARCHAR The command that was used to create the trigger.
remarks LONG VARCHAR Remarks about the trigger. This value is stored in the ISYSREMARK system table.
source LONG VARCHAR The SQL source for the trigger. This value is stored in the ISYSSOURCE system table.
 Constraints on underlying system table