Chapter 5 Building Triggers and Procedures
Creating a trigger from scratch
You can create a trigger without basing it on a template. However, we recommend that you use a template as this will simplify reuse of your code and make your triggers more portable.
To create a trigger from scratch:
- Double-click a table symbol to open its property sheet, and then click the Triggers tab.
- Click the Add a Row tool to create a new trigger, and type a name and code.
- Click Apply to commit the creation of the new trigger, and then click the Properties tool to open its property sheet.
- Click the Definition tab.
- Enter the trigger definition code. You can add trigger template items, use PDM variables and macros and various other tools available from the toolbar (see "Using the Definition tab toolbar").
The trigger will be marked as user-defined and will be excluded from most forms of rebuilding (see "Rebuilding Triggers").
- You can also modify the trigger's other properties. For a full list of the properties available, see "Trigger properties".
- Click OK in each of the dialog boxes.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|