Choose your database:
MS SQL Server
SQL Anywhere

Subscribe to our news:

ASA Maestro online Help

Prev Return to chapter overview Next

Trigger Editor

Trigger Editor can be opened automatically after the trigger is created and is available on editing the trigger.

The basic principles of Object Editors in ASA Maestro are considered in the corresponding topic. See below to find the description of editor tabs that are unique to the current object.



The main tab of the editor consists of several parts:, trigger definition, and trigger properties.



Defines the trigger conditions and actions.




Here you can view and change the trigger name.

Note: the name of the object must be unique among all the object names in its container. Moreover, all the objects that are source of data need unique names among themselves. You can use any identifier that is allowed by Sybase SQL Anywhere server.


This field contains a comment to the trigger.


Subject (Row, Statement)

This specifies whether the trigger procedure should be fired once for every row affected by the trigger event, or just once per SQL statement.


Type(Before, After, Resolve)

Determines whether the function is called before or after the event.


Event (Insert, Update, Update Fields or Delete)

Specifies the event that will fire the trigger.



Triggers of the same type (insert, update, or delete) that fire at the same time (before, after, or resolve) can use the clause to determine the order that the triggers are fired. Specifying 0 is equivalent to omitting the clause.


New name, Old name, Remote name

The clauses allow you to refer to the inserted, deleted or updated rows. For the purposes of this clause, an update is treated as a delete followed by an insert.


An Insert event takes the new name clause, which represents the inserted row.
A Delete event takes the old name clause, which represents the deleted row.
An Update takes the old name clause, which represents the row before the update, and it takes the new name clause, which represents the row after the update.


The meaning of old name and new name differs, depending on whether the trigger is a row-level or a statement-level trigger.


For row-level triggers, the old name clause allows you to refer to the values in a row prior to an update or delete, and the new name clause allows you to refer to the inserted or updated values. The OLD and NEW rows can be referenced in BEFORE and AFTER triggers. The new name clause allows you to modify the new row in a BEFORE trigger before the insert or update operation takes place.
For statement-level triggers, the old name and new name clauses refer to declared temporary tables holding the old and new values of the rows. The default names for these tables are deleted and inserted.


The Remote name clause is for use with SQL Remote. It allows you to refer to the values in the VERIFY clause of an UPDATE statement. It should be used only with RESOLVE UPDATE or RESOLVE UPDATE OF column-list triggers.


To apply the changes, select the Apply Changes item in the Navigation bar or use Ctrl+F9 or Ctrl+F7 shortcut keys.


It is also possible to modify object properties without opening the object editor: use the Object Properties item of the popup menu of the selected object from the explorer tree.

Prev Return to chapter overview Next