Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Using Procedures, Triggers, and Batches » Introduction to triggers

Executing triggers Next Page

Altering triggers

You can modify an existing trigger using either Sybase Central or Interactive SQL. You must be the owner of the table on which the trigger is defined, or be DBA, or have ALTER permissions on the table and have RESOURCE authority.

In Sybase Central, you cannot rename an existing trigger directly. Instead, you must create a new trigger with the new name, copy the previous code to it, and then delete the old trigger.

Alternatively, you can use an ALTER TRIGGER statement to modify an existing trigger. You must include the entire new trigger in this statement (in the same syntax as in the CREATE TRIGGER statement that created the trigger).

For more information on altering database object properties, see Setting properties for database objects.

To alter the code of a trigger (Sybase Central)
  1. Open the Triggers folder.

  2. Select the desired trigger. You can then do one of the following:

  3. To alter the code of a trigger (SQL)
    1. Connect to the database.

    2. Execute an ALTER TRIGGER statement. Include the entire new trigger in this statement.

    3. For more information, see ALTER TRIGGER statement.