Contents Index Executing triggers Dropping triggers

ASA SQL User's Guide
  Using Procedures, Triggers, and Batches
    Introduction to triggers

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:

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.

For more information, see ALTER TRIGGER statement.


Contents Index Executing triggers Dropping triggers