To create a new trigger, right-click on the node of the table, for which you wish to add a trigger. From the node's context menu, choose the Create Trigger command. This command opens the SQL Editor.
To modify an existing trigger, double-click on the node of the trigger you wish to modify, or right-click on this node and choose the Alter Trigger command from the context menu. Either of the commands opens the SQL Editor.
To create or alter the trigger definition using SQL Editor, type the trigger statement in the SQL Editor using standard SQL.
You should enter only the trigger statement, that is, the part
of the CREATE TRIGGER
query that is placed
after the FOR EACH ROW
clause.
All other trigger properties are set in the Properties window. These properties are:
Definer
Event Manipulation
Name
Timing
Some of these properties can have arbitrary text values, others accept values from a predefined set. In the latter case set the desired value using the embedded combo box.
The properties Event Table
,
Schema
, and Server
in the
Properties window are read only.
To save changes you have made, use either Save or Save All buttons of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.
User Comments
Add your own comment.