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).
To alter the code of a trigger (Sybase Central)
Connect to the database as a user with DBA authority or as the owner of the trigger.
In the left pane, double-click Triggers.
Select the trigger.
Use one of the following methods to alter the trigger:
You can open a separate window for each procedure and copy code between triggers.
If you use the Database Documentation Generator to document your SQL Anywhere database, you will have the option to include these comments in the output. See Documenting a database.
To alter the code of a trigger (SQL)
Connect to the database as a user with DBA authority or as the owner of the trigger.
Execute an ALTER TRIGGER statement. Include the entire new trigger in this statement.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |