To create a new trigger, right-click the node of the table in which to add the 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 the node of the trigger to modify, or right-click 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.
Enter only the trigger statement, that is, the part of the
CREATE TRIGGER query that is placed
FOR EACH ROW clause.
All other trigger properties are set in the Properties window. These properties are:
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.
Server in the
Properties window are read-only.
To save changes you have made, use either Control + S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.or buttons of the Visual Studio main toolbar, or press
To observe the runtime behavior of a stored routine and debug any problems, use the Stored Procedure Debugger. For additional information, see Section 5.10, “Debugging Stored Procedures and Functions”.