Online Library Internet News Internet Investing Internet Technology Windows Internet Tech. Next A trigger is a special type of stored procedure that SQL Server executes when an insert modify or delete operation is performed against a given table. If the trigger causes a request to fail SQL Server refuses the information update and returns an error message to the application attempting the transaction. The most common use of a trigger is to enforce business rules in the database.
Triggers run after the application of rules and other referential integrity checks.
Therefore if an operation fails these other checks the trigger does not run. An operation must have otherwise succeeded before SQL Server will consider or execute a trigger's conditions or operations. Triggers don't affect the server's performance significantly and are often used to enhance applications that must perform many cascading operations on other tables and rows. The types of rules that these DRI statements can enforce are relatively complex. All Rights Reserved.