You create triggers using either Sybase Central or Interactive SQL. In Sybase Central, you can use a wizard to provide necessary information. In Interactive SQL, you can use a CREATE TRIGGER statement. For both tools, you must have DBA or RESOURCE authority to create a trigger and you must have ALTER permissions on the table associated with the trigger.
The body of a trigger consists of a compound statement: a set of semicolon-delimited SQL statements bracketed by a BEGIN and an END statement.
You cannot use COMMIT and ROLLBACK and some ROLLBACK TO SAVEPOINT statements within a trigger.
Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA or Resource authority.
In the left pane, click Triggers.
Choose File » New » Trigger.
Follow the instructions in the Create Trigger Wizard.
To complete the code, in the right pane click the SQL tab.
Connect to a database as a user with DBA authority. You must also have ALTER permissions on the table associated with the trigger.
Execute a CREATE TRIGGER statement.
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|