Create an ASE trigger to enforce a referential integrity constraint in an ASE database.
PrerequisitesÂ
Before you can create a trigger, be sure the data server that contains the trigger is
running, and you created and established a connection to the data
server.
- In the Databases folder in Enterprise Explorer, under the database connection profile,
expand
the
tree for a database, expand the
Schemas folder and then the tree for the appropriate schema owner.
- Expand the
Tables folder.
- Right-click the
table to which to add the trigger, and select
.
-
Enter the Name.
For example, titleInsert.
-
Select
For Update,
For Insert, or
For Delete to indicate the condition under which the trigger invokes when the associated table is modified.
-
(Optional) Enter a description in the
Comments field.
- Click
Next and specify save and execution
properties.
Field |
Description |
Generate Script |
Generate a SQL file for the object. |
Enter or Select the Parent Folder |
Specify an existing project or create a new project in
which to save the SQL file. |
File Name |
Enter the file name in which to store the
SQL code. |
Execute Immediately |
Execute the SQL code immediately. If you do not select this
option, you must complete execution of the SQL file later to create the object. |
Open in Editor After Creation |
Create the object and open it in its associated editor. |
- Click
Finish to create the trigger.