Creating a Trigger

Create a trigger on a table to enable checks whenever data is inserted, updated, or deleted.

A trigger is a special type of procedure attached to a table column that goes into effect when a user changes the table. Triggers execute immediately after data modification statements are completed.

  1. In the Perspective Resources view, select the server on which the table resides, then click the drop-down arrow next to the server name and select Administration Console.
  2. In the left pane of the Administration Console, expand ASE Servers > Schema Objects > Tables, then choose one of the following:
    • User Tables
    • Proxy Tables
  3. Select the table for the new trigger.
  4. Select Properties.
  5. From the Table Properties window, select Triggers > New.
    You see the Add Trigger wizard.
  6. Enter the name of the trigger, then select the owner of the trigger.
  7. In the Trigger type window:
    • Select the events, that when executed, will call the trigger.
    • Select Update of columns, then select the columns to be updated. If changes are made to any of the selected columns, the trigger executes.
  8. Enter the SQL statements for the new trigger and related table objects.
  9. (Optional) Click Summary to verify your selected options.