O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating DML Triggers

You can create and manage triggers in SQL Server Management Studio or directly via Transact-SQL (T-SQL) statements. The Object Explorer in SSMS provides a simple means of creating triggers that you can use to generate the underlying T-SQL code. You expand the Object Explorer tree to the user table level and then right-click the Triggers node. When you select the New Trigger option, as shown in Figure 26.1, the trigger template shown in the right pane of Figure 26.1 appears.

Image

FIGURE 26.1 Using SSMS to create triggers.

You can populate the trigger template by manually editing it, or you can select the Query menu option Specify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required