Join Martin Guidry for an in-depth discussion in this video Using "after" triggers, part of SQL Server: Triggers Stored Procedures and Functions.
In this chapter, I'll be working with two new tables; a products table and…a categories table.…I've created a script that will generate those tables and populate them with some data.…There in your exercise files. You can copy and paste all of that into…Management Studio and run it.…And it should've given me two new tables.…And let's double check and make sure we have some data in those tables. Oh, that looks good.…The first type of trigger I'd like to talk about is called an 'after' trigger.…
It's called this because it executes immediately after an insert, update…or DELETE statement.…The trigger allows the original statement to occur with no modifications.…Then it immediately takes over and starts doing some work.…In this example, we're going to use the trigger to enforce a business rule.…The business rule states that whenever a category is marked as inactive, all of…the products in that category should immediately be marked as inactive also.…So I have some code staged for this in your exercise files.…
- Comparing triggers, functions, and stored procedures
- Installing and configuring SQL Server
- Creating a stored procedure
- Returning data using data sets
- Creating user-defined functions
- Using "after," "instead," and nested triggers
- Modifying existing stored procedures
- Implementing logging on DELETE
- Choosing between T-SQL and CLR
- Executing a stored procedure
- Passing parameters
Skill Level Advanced
1. Getting Started
2. Installing SQL Server
Configuring your environment4m 53s
3. Stored Procedures
4. User-Defined Functions
6. Putting It All Together
7. Using CLR Assemblies
8. Exploring an ASP.NET Web Application
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.