O'Reilly logo

Pro SQL Server 2012 Relational Database Design and Implementation by Jessica M. Moss, Louis Davidson

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

APPENDIX B

image

DML Trigger Basics and Templates

In this appendix, I briefly introduce triggers and how they are written and present templates that you can use as the basis for creating DML triggers for all sorts of uses. There are two different types of DML triggers that are coded very similarly, but serve different purposes:

  • The AFTER trigger is made to be called after an INSERT, UPDATE, or a DELETE, and the constraints it references, is called. It is used to apply complex checks and to add side effects to a DML operation as may be needed. AFTER triggers are usually used for handling rules that won’t fit into the mold of a constraint, for ...

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