As database objects, triggers are listed in sysobjects by name. The type column of sysobjects identifies triggers with the abbreviation “TR”.
select * from sysobjects where type = "TR"
In SAP ASE 16.0, the first trigger created on a table for delete, insert, and update operations, where the trigger is created without the order clause (or order 0) is associated with the table in one of the above columns in sysobjects.
The second and subsequent triggers created for a given action are associated with the table through a row in syscontraints. In addition, any trigger with order 1 or greater always uses sysconstraints for the table/trigger association.
The @@trigger_name global variable returns the name of the trigger that is currently executing.
select @@trigger_name
If nested triggers are fired, @@trigger_name holds the name of the most recently fired trigger.
The source text for each trigger is stored in syscomments. Execution plans for triggers are stored in sysprocedures. The system procedures described in the following sections provide information from the system tables about triggers.