CHAPTER

14

Triggers

In This Chapter

•   Introduction to Triggers

•   Application Areas for DML Triggers

•   DDL Triggers and Their Application Areas

This chapter is dedicated to a mechanism called a trigger. The beginning of the chapter describes Transact-SQL statements for creating, deleting, and modifying triggers. After that, examples of different application areas for DML triggers are given. Each example is created using one of three statements, INSERT, UPDATE, or DELETE. The second part of the chapter covers DDL triggers, which are based on DDL statements such as CREATE TABLE. Again, examples of different application areas related to DDL triggers are given.

Introduction to Triggers

A trigger is a mechanism that is invoked when a particular ...

Get Microsoft SQL Server 2019: A Beginner's Guide, Seventh Edition, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.