Chapter 15. Writing Triggers

IN THIS CHAPTER

You might find it strange that there is a chapter on triggers in a book about stored procedures. When you think about it, though, it's really not that strange. In the most basic of explanations, a trigger is a specialized type of stored procedure that's conditionally executed based on certain actions in your database. For example, you can create a trigger that will execute when a row is inserted into a table. Until the release of SQL Server 2000, the only types of triggers available were those that ran in the context of a transaction that added, modified, or deleted data from a table. Microsoft's ...

Get Writing Stored Procedures for Microsoft SQL Server 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.