create trigger for Multiple Triggers

Create multiple triggers using the create trigger command, and specify the order that the triggers fire with the new order parameter.

Syntax

create [or replace] trigger [owner.]trigger_name
    on [owner.]table_name
    {for | instead of} {insert | update | delete}
    [order integer]
    as sql_statements

Parameters

order integer specifies a partial or full ordering of trigger firing:
  • Full ordering occurs when you create all the triggers using the order clause.
  • Partial ordering occurs if you do not specify the order clause on some of the triggers. Triggers without the order clause implicitly take order number 0 and do not have a defined order, except that they fire after those triggers created using order.

Usage

Note: You can only use the order integer clause with for {insert | update | delete}; you cannot use it with instead of {insert | update | delete} triggers.

If you use a duplicate number for order, SAP ASE reports an error. order numbers need not be consecutive; in fact, nonconsecutive numbers might be preferable, as they allow you to insert new triggers into the middle of an order.

Related concepts
Creating Multiple Triggers