3 4
The following questions are intended to reinforce key information presented in this chapter. If you are unable to answer a question, review the appropriate lesson and then try the question again. You can find answers to the questions in Appendix A, "Questions and Answers."
- You have applied constraints, an INSTEAD OF trigger, and three AFTER triggers to a table. A colleague tells you that there is no way to control trigger order for the table. Is he correct? Why or why not?
- You need to make sure that when a primary key is updated in one table, all foreign key references to it are also updated. How should you accomplish this task?
- Name four instances when triggers are appropriate.
- When a trigger fires, how does it track the changes that have been made to the modified table?
- Name a table deletion event that does not fire a DELETE trigger.
- Name a system stored procedure and a function used to view the properties of a trigger.
- Using Transact-SQL language, what are two methods to stop a trigger from running?
- Write a (COLUMNS_UPDATED()) clause that detects whether columns 10 and 11 are updated.
- Name three common database tasks accomplished with triggers.
- What command can you use to prevent a trigger from displaying row count information to a calling application?
- What type of event creates both an Inserted and Deleted logical table?
- Is it possible to instruct a trigger to display result sets and print messages?