Programming SQL Server Database Triggers and Functions

SQL Server Triggers and Functions can be powerful tools for the DBA. In this course we'll demonstrate best practices, provide solutions to common problems, and identify when Triggers and Functions are the best choice for your requirements.
Course info
Level
Intermediate
Updated
Jun 17, 2019
Duration
3h 21m
Table of contents
Course Overview
Validating and Modifying Data with DML Triggers
Protecting the Database with DDL and Logon Triggers
Working Smarter with Triggers
Reusing Code with Functions
Scaler and Table-valued Functions
Improving Function Performance with Inline Table-valued Functions
Description
Course info
Level
Intermediate
Updated
Jun 17, 2019
Duration
3h 21m
Description

As a SQL Server Database Developer, it is often necessary to have business-layer logic that exists within the database to ensure clean, consistent data. Although constraints and foreign key relationships can go a long way to provide the essential relational guarantees, Triggers provide the ability to validate and act on data at the time of modification, while Functions help you provide consistent methods for accessing the data across applications. In this course, Programming SQL Server Triggers and Functions, you will learn foundational knowledge to better administer and develop efficient, high-performing Triggers and Functions. First, you will learn how to develop DML, DDL, and LOGON Triggers, and how to avoid common mistakes. Next, you will discover the differences between Multi-Statement and Single-Statement functions and how to write the most efficient functions possible. Finally, you will explore some lesser-known features and upcoming improvements in newer versions of SQL Server that can improve your overall experience with Triggers and Functions. When you are finished with this course you will have the skills and knowledge needed to administer and develop efficient, high-performing Triggers and Functions.

About the author
About the author

Ryan loves exploring data and using technology in ways that lead to new discoveries. He’s at the top of his game learning something new about the data platform or teaching others.

Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone. My name is Ryan Booz, and welcome to my course, Programming SQL Server Triggers and Functions. I'm currently the chief software architect at KCF Technologies by day and a blogger, author, and speaker usually focused on SQL Server and data analytics tools. In this course, we're going to dive into the fundamentals of using SQL Server triggers and functions showing how triggers allow you to validate and react to schema and data modifications while functions help you provide consistent methods for accessing the data across the application. Some of the major topics we will cover include using DML triggers to interact with data, using DDL and login triggers for schema management, best practices to get better performance out of your triggers, and creating user-defined functions that perform well in all circumstances. By the end of this course, you will have the skills and knowledge needed to administer and develop efficient, high-performing triggers and functions. Before beginning this course, you should be familiar with SQL Server 2008 or above, be comfortable with writing SQL code beyond basic select and insert statements, and be comfortable with SQL Server Management Studio. I hope you'll join me on this journey to learn triggers and functions more deeply with the Programming SQL Server Triggers and Functions course, at Pluralsight.