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).
Use the SQL Anywhere 12 plug-in to 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:
In the right pane, click the SQL tab.
Right-click the trigger and choose Edit In New Window.
You can open a separate window for each procedure and copy code between triggers.
To add or edit a procedure comment, right-click the trigger and choose Properties.
If you use the Database Documentation Wizard to document your SQL Anywhere database, you will have the option to include these comments in the output. See Documenting a database.
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.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|