Each has benefits that make them useful in special situations. The primary benefit of triggers is that they can contain complex processing logic that uses Transact-SQL code. Triggers are most useful when the features supported by constraints cannot meet the functional needs of the application. If your application requires that a delete from one table will also result in a delete of related data in another table, or if the referential integrity requires something other than an exact match, you must use a trigger. If your application requires that a column value be validated against a column in another table, you must use a trigger.
Constraints can communicate about errors only through standardized system error messages.
This page is part of the Columbus State University Web site. Send mail to the CSU Webmaster with questions or comments about this Web site.