Creating an ASE Trigger

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.

  1. Expand the Tables folder.
  2. Right-click the table to which to add the trigger, and select New > Trigger .

    The Create Trigger Skeleton page appears.

  3. Enter the name of the trigger in the Name field.

    For example, titleInsert.

  4. Select For update, For insert, or For delete to indicate the condition under which the trigger is to be invoked when the associated table is modified.
  5. Enter an optional description in the Comments field.
  6. Click Next, and specify save and execution properties for the trigger.
    Field Description
    Generate script Select this option to generate the script for the trigger.
    Enter or select the parent folder Specify an existing project or create a new project in which to save the SQL.
    File name Enter the name of the file in which to store the SQL.
    Execute immediately Execute the SQL immediately. If you do not select this option, you must complete execution of the SQL later to create the trigger.
    Open in editor after creation Create the trigger, and then open it in the Trigger Editor.
  7. Click Finish to create the trigger.
Related concepts
Triggers
Related tasks
Creating a SQL Anywhere Trigger
Editing a SQL Anywhere Trigger
Editing an ASE Trigger
Dropping a Trigger
Renaming a Trigger

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.