Conclusion

Triggers allow you to automate processes. Process automation means less manual work and fewer chances to make mistakes and errors. You can use triggers to enforce complex integrity checks, audit changes, maintain denormalized data, and much more. SQL Server 2005 allows you to create triggers for DML statements and for DDL ones. You can use either T-SQL or .NET as your coding language.

Anyone can program triggers, but not everyone can program triggers efficiently. To program triggers efficiently, you need to understand the aspects of working with the inserted and deleted tables, the architecture of the product, the transaction log, the row versioning technology, and potential bottlenecks in the system.

Get Inside Microsoft® SQL Server™ 2005 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.