Code
To add the SQL code for the trigger, select the node in the left-hand pane that corresponds to the database type used in your runtime environment, namely :
- Code MsSql - Microsoft SQL database
- Code Oracle - Oracle SQL database
- Code Db2 - IBM DB2 database
The SQL code is entered in the right-hand pane. Refer to the documentation for your database management system to learn which syntax can be used.
Note:
- The AMT Developer Studio does not perform any syntax checks on this code, therefore you must test it manually. If triggers are generated with code that is not valid for the database system that is used at runtime, this will lead to errors during the database reorganization.
- When declaring cursors inside triggers, take care to use unique names for each cursor to avoid duplicate name errors in cascading triggers.
- If the database timestamp fields are enabled, via the application option, a trigger (insert & update) is added automatically for that table. Adding a second trigger that also modifies the same table could lead to unexpected results.